I developed a iPhone App with JqueryMobile and Phoenagap. I minified all files with code, deleted unused files, but app is still quite slow. Problem is. If i tap on button transformation will started appdrox. after 1 second. I Would like to do pages transitions more quick.
I also disable unused part od device (Camera, etc,) but is it still slow.
Can anybody help me With this problem?
I testing on iPhone 4g.
Pointers for improving performance
Cache jQuery Objects
Consider alternatives to:
Changing to
display:noneis much faster. Maybe just useaddClass('hidden')andremoveClass('hidden')Minimize the use of slow jQuery methods
O(n^2)
The following methods are expensive as well:
The process behind these manipulation methods is the following: cleaning the input string, converting the string into a DOM fragment and injecting it into the DOM.
Optimize selectors:
In order of performance:
Get specific, preferably choosing a parent’s id to start with:
Use the child selector where possible instead of descendant selector:
Use find over context:
Use .filter() instead of using tag selectors:
Memoization: