Firefox OS/Performance/Boot Sequence Optimization: Difference between revisions

Jump to navigation Jump to search
Line 81: Line 81:
[http://people.mozilla.org/~jbailey/v10G-first-baselines/ Old Baseline statistics]
[http://people.mozilla.org/~jbailey/v10G-first-baselines/ Old Baseline statistics]
These results were collected but then i decided to base my experiments on a slightly newer baseimage
These results were collected but then i decided to base my experiments on a slightly newer baseimage
Note that all data collected applies to the Flame reference device.


[http://people.mozilla.org/~jbailey/v121-2-baseline/ Baseline statistics]
[http://people.mozilla.org/~jbailey/v121-2-baseline/ Baseline statistics]
Line 110: Line 112:
[http://people.mozilla.org/~jbailey/v121-2-premainb2g/ Experiment #1]
[http://people.mozilla.org/~jbailey/v121-2-premainb2g/ Experiment #1]


In this simple experiment only a change to "init.rc" was made. By default b2g was started along with a host of other services in the same class "main". For this experiment B2G was moved into its own class that was run just before main. As expected this did not have significant effect however. Quantitatively one does notice a difference in the bootchart images reflecting B2G being started slightly earlier. Of note is that as a result of this change, there is a more pronounced black screen between the T2mobile and the "Mozilla Developer Network" logos. Dave Huseby has noted in the past that such a noticeable black screen exists in other devices.
In this simple experiment a simple change to "init.rc" was made. By default b2g was started along with a host of other services in the same class "main". For this experiment B2G was moved into its own class that was run just before main. As expected this did not have significant effect in when B2G was launched however. Quantitatively one does notice a difference in the bootchart images reflecting B2G being started slightly earlier. Of note is that as a result of this change, there is a more pronounced black screen between the T2mobile and the "Mozilla Developer Network" logos. Dave Huseby has noted in the past that such a noticeable black screen exists in other devices.
 
Images Images


The next step is to determine if there are any dependencies such that B2G can't be moved even further back (and if this is done, take care of the black screen somehow)
Based on the current code, the earliest it is conceivably possible to run B2G would be in the early-init stage of init.rc. This stage was observed to be executing at around 4.8s of uptime. Realistically a lot of things would need to be changed for this to work (that is to say, a lot of things break when this is attempted). A more logical stage would be early-boot (which is not used in the default init script, however is a supported stage that occurs between post-fs-data and boot). What is notable about this stage is that, A.) if done here, B2G launches at around 5.8s and B.) It successfully runs. Sometimes. There are clearly some dependencies that are not quite guaranteed to be ready if one attempts to launch B2G this early, which could be the subject of a future investigation to see if those dependencies could be made to occur any earlier. But as it stands, this only launches B2G a little over 2 seconds earlier and there actually was no change in overall boot time observed (again dependencies not being requested comes to mind as an explanation).


==References==
==References==
[https://developer.mozilla.org/en-US/Firefox_OS/Platform/Architecture#Firefox_OS_bootup_procedure Firefox OS Bootup Procedure]
[https://developer.mozilla.org/en-US/Firefox_OS/Platform/Architecture#Firefox_OS_bootup_procedure Firefox OS Bootup Procedure]
Confirmed users
125

edits

Navigation menu