Changes

Jump to: navigation, search

Firefox OS/Performance/App Performance Validation

2,698 bytes added, 17:07, 28 February 2014
4. Load Time
'''Platform Contact''': Varies, use profilers to narrow down the issue or contact the Performance team.
'''What does it mean''': The duration, in millisecond, required to load the app. This is usually pretty difficult to measure because the definition of "load the app" varies from app to app. Generally though, we're talking about the time between the user launching the app and the '''visible''' UI being fully drawn and responsive. I put an emphasis on the visible UI because many apps require lots of computation and/or I/O to initialize their state enough to draw the full UI for the initial app screen. If every app waited until it was fully initialized before drawing the UI, they would all appear to be very slow and unresponsive.
The trick to getting a fast load time is to as little as possible before putting up the '''visible''' part of the UI. All long term calculations and I/O should be delayed into an idle timer callback if possible. Apps that load to list UIs (e.g. contacts, sms, email) should only load enough data to display the UI that is initially visible to the user. The rest of the list can then be loaded in an idle timer callback.
 
The real key here is to make sure that the UI is drawn as early as possible. Preferably, show a UI that isn't going to have a lot of box size re-adjustments due to reflows. Having a bunch of box resizes during load makes the app feel like web page rather than a native app. The goal here is to provide a native app experience using web technologies.
'''Verification Steps''':
The easiest way to verify this is to use the existing profiler: [https://developer.mozilla.org/en-US/docs/Performance/Profiling_with_the_Built-in_Profiler#Profiling_Boot_to_Gecko_%28with_a_real_device%29] Since there are no obvious markers in the profiles of where your app load ends, it will be up to you to either output data to the log or call a dummy function where the loading should be done and then find the function call in the profile. The latter method is tricky because of the asynchronous nature of the callbacks and the rendering code. It all comes down to knowing your app's code well and then spending time to do a careful examination of the profiles in the Cleopatra tool: [http://people.mozilla.org/~bgirard/cleopatra/]
 
If you are working on a B2G app, the datazilla tool measures cold_load_time for each of those. That's a good place to start when see if there has been a regression: [https://datazilla.mozilla.org/b2g/?branch=master&device=hamachi&range=7&test=cold_load_time&app_list=browser,calendar,camera,clock,contacts,email%20FTU,fm_radio,gallery,messages,music,phone,settings,template,usage,video&app=phone&gaia_rev=8f37a3795a07cfd5&gecko_rev=1c18d06925f1faef&plot=avg]
'''Report''':
* Capture profiles using the build-in profiler.
* Upload them to Cleopatra and put the Cleopatra url in the bug.
* Contact the performance team if you're stuck.
== 5. Layer Tree ==
Canmove, confirm
225
edits

Navigation menu