Top 10 Performance Techniques for PhoneGap Applications
- TEST: Test with the actual data and devices to feel the performance
- Avoid reflow: Modify the DOM once. Put all data together, then update the DOM. Not frequently update the DOM.
- Do you really need the framework: Or you can just apply some CSS tricks to archive the same goal
- Limit shadows and gradients:
- Use CSS sprite sheets: Do not load each image individually
- Avoid click event 300ms delay: Use touch event
- Use hardware acceleration: Use CSS transform: translate3d(-100%,0,0); It will use GPU, instead of CPU.
- Cache everything: cache static content, cache templates
- Don't wait for the data to display the UI: display the UI, and update it when the data is ready. People do not wait on the UI, they are waiting for the data.
- Don't generate the UI on the server
No comments:
Post a Comment