However the development of our brand new charts feature (world exclusive – being released very soon!) required usage of jQuery so we needed to assess the real-world performance impact of using third party libraries.
What we did
Tests that were performed
|Test suite name||Notes|
|Select by id|
|Select by class|
|Attach data to element|
|Insert HTML inside element|
Test framework used
All tests were performed inside a UIWebview to ensure representative results (Safari provides additional hardware acceleration not available in UIWebviews)
The testing conditions were as follows:
- jQuery 2.0.3 and Zepto.js 1.0 Library were used
- Version of iOS used (iPad 1 = 5.1.1, all others = 6.13)
- All tests were performed in a UIWebView (rather than Safari)
So as the results show jQuery 2.0.3 is significantly faster than Zepto.js 1.0 although it is still around 70% slower than pure native in most cases. That reduction in performance isn’t notable unless you're doing more than 3k operations per second. Therefore unless a multitude of highly complex operations are being performed jQuery is the preferred choice due to speed of development over native.