I’m moving with my advisor to UIUC, so is this blog… Check here.
1. In this slides, on page 40, the author suggests that “Don’t set style properties inside a loop” and “Don’t do what you do on the web”(need to figure out what are they?)
- On page 10, the author suggests that “Don’t emulate native UI”. Because it’s hard to do and it may not get you a good result. What you should do (page 11) is to use document-oriented UI.
- On page 15, Bridges can have performance impact. Do these operations when not doing anything performance critical.
- On page 17, optimize the part where optimization actually counts. Don’t complicate other parts. Keep things simple.
- On page 21, About Graphics. 60FPS is the standard and ideal UX, key is lean on the GPU, the way to do this on web app is to use CSS3 Animation and transitions. But on the other hand, as soon as you put a element in web code into css transitions, it will start using more memory. The memory limit for older version of ios is10 Mb;
- Still on page 21, Shadows and gradients slowing the CPU; Compositing & Overdraw (How many times blending layers when composite different things).(Try to collapse blending layers together). (Making transparent element opaque, because Opaque element is much faster than transparent elements.)
- Flipboard start with web code and optimized by native code. Do simple thing first.
The following comes from HTML5 Rocks Tutorial
- Offload tasks that would otherwise be calculated by the main CPU to the graphics processing unit (GPU) in your computer’s graphics adapter
Using performance intensive module to native side ( http://www.codefessions.com/2012/09/creating-native-user-experience-with.html)
But facebook haven’t given up HTML 5. [Quora Thread]
Before trying those apps, readers should be noted that the hybrid app does not necessarily mean “PhoneGap” app. The detail illustration is in this thread.
1. Facebook Apps
The old facebook apps for iOS and Android, and current facebook apps for non-iOS and non-Android platform are hybrid apps.
2. Gmail iOS Hybrid Apps
Developer still prioritize the desktop as the first when developing web application.
For existing platform or future platform, despite their capabilities, they all have these three constraints: Network, Compute (CPU), Render (GPU, pixels).
But that’s not for sure. Best practice may not work.
Page Load Time.
if you have control of your server, you can also:
Front end optimizing tool:
You can also use resource timing api
If chrome failed to hit the frame budget, we call it janks:
In the computer area:
1) Class body: Changing the class body will affect large portion/many elements of the tree: (only change the thing you need to change)
2) Layout trashing
Get once and set many
JS & CSS (Rather than telling browser exact thing to do (by JS), you can tell it what you want it to achieve (by CSS), so that browser can do the task the best way it can. )
Keep your event listener code to a minimum, because they will be called many times:
Reduce paint cost: Reduce the size; Reduce the complexity(Enable continuous page repainting to figure out the cost of your style.)
For the user: