3,860
edits
Wilsonpage (talk | contribs) |
m (Lakrits moved page FirefoxOS/Performance/App Performance Validation to Firefox OS/Performance/App Performance Validation: The official spelling of "Firefox OS" leaves a space between the two parts of the name. It's easier to find a page if the...) |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
'''Note: This page has now been edited published on MDN, as part of the App Center performance section — see https://developer.mozilla.org/en-US/Apps/Build/Performance/App_performance_validation. Any further changes should be made there. Talk to Chris Mills for more details.''' | |||
This page outlines a simple process for manually auditing and improving the performance of an app. | This page outlines a simple process for manually auditing and improving the performance of an app. | ||
Line 98: | Line 100: | ||
'''What does it mean''': | '''What does it mean''': | ||
Having a good layer tree means we can most changes without having to repaint the page. Think of a | Having a good layer tree means we can perform most changes without having to repaint the page. Think of a cartoon on the television like The Simpsons: Most cartoons will divide their scene into a few layer and will move the layers themselves instead of redrawing the scene for every frame of the cartoon. Using layers to perform animations means we can avoid redrawing the page every frame and can simple move these layers around. | ||
Line 124: | Line 126: | ||
'''Debugging''': | '''Debugging''': | ||
* Attach with the App Manager and tweak the structure and styles of the page to trigger the desired behavior. | * Attach with the App Manager and tweak the structure and styles of the page to trigger the desired behavior. | ||
and | |||
* Get a display list dump. Build b2g with 'export B2G_DUMP_PAINTING=1' in your .userconfig (note: if you have a debug build, you don't need this). Set the preference 'user_pref("layout.display-list.dump", true);'. | |||
* Look for the display list dump for the particularly process at the moment of interest. It will contains a list of display items and their mappings between layers and their original frames. | |||
'''Creating/Destroying layers''': | '''Creating/Destroying layers''': |
edits