@sgiehl opened this Pull Request on June 8th 2014 Member
  • Switched to DeviceDetector 2.X
  • Do detection only once (in tracker/settings). There is no need doing device type detection in DeviceDetection plugin as all those detections are already done before (Doing them twice slows down tracking)
  • Introduce new DeviceDetectorCache to use an optimal caching for DeviceDetector (File Cache + Static Caching)
  • Speed up detection for bulk requests (thx to @cbonte)
  • Use special parsers where only those are needed (e.g. check for bots or mobile os)
@cbonte commented on June 8th 2014 Contributor

@sgiehl Tests are in progress. From the first results, It seems it's a little better but I can't import more than 800-810req/s (which is still quite good compared to the results without any cache). I'm making some more tests but I think it's because with the factory, we're calling the parse() method for everything and not only for bots.

@sgiehl commented on June 8th 2014 Member

DeviceDetector skips parsing additional data when a bot is detected. So it
should be the optimal way as parsing is always only done once.
The only thing that could be improved might be caching more devicedetector
instances. But I guess that would only make sense using memcache or
something similar as file cache is too slow for that.

@cbonte commented on June 8th 2014 Contributor

Yes, I saw the tests after posting.
After several tests with 2.4.0-b5 and this branch, that's OK for me, the performances are nearly equal, using the same logs.

@mattab commented on June 17th 2014 Member

That was a great Pull request... well done Stefan, you're the man! Merging now... feel free to make edits as you see fit!

This Pull Request was closed on June 17th 2014
Powered by GitHub Issue Mirror