hungdt138 / html5rocks

Automatically exported from code.google.com/p/html5rocks
0 stars 0 forks source link

"Performance Wins for Your Mobile App" #442

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

Fragments for screen resolutions: come up with framework for different 
resolutions.

"Time-to-text" on mobile is important. Load things lazily (don't display images 
/content that may never be seen. @font-face keeps text invisible while font 
downloads.

Minimize browser reflows: If you make complex rendering changes such as 
animations, do so out of the flow. Use position-absolute or position-fixed to 
accomplish this.

document.createDocumentFragment()
dataURIs
css selectors (read from right to left -> no decendant selectors, ids are best)
css3 3d transforms for animations instead of el.style.top/el.style.left
gzip, js/css compressions
combine css/jss
sprites
hiding/unhiding containers instead of creating them on the fly?
Be smart about DOM manipulations: e.g. reduce browser repaints
new ECMASCript methods (querySelector, array methods, etc.) instead of libs.

Original issue reported on code.google.com by ericbide...@html5rocks.com on 18 Feb 2011 at 7:46

GoogleCodeExporter commented 9 years ago
"Crucial Optimizations for Memory Constraint Devices"

Original comment by ericbide...@html5rocks.com on 18 Feb 2011 at 7:51