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

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 24: Line 24:


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

Revision as of 19:33, 6 May 2014

Initial Ideas

  • Minimize data loaded by boot loader.
    • Compacting vmlinuz/zImage by moving compiled-in drivers to modules.
    • Minimize initial ramdisk if there is one.
    • Minimize kernel cruft by excluding all unneeded drivers.
    • Strip the kernel and all modules.
  • Minimize init launch sequence.
    • Make init only launch the bare minimum for b2g process to launch.
    • Ideally, init will only launch b2g.
  • B2G start-up sequence.
    • Remove all synchronous external dependencies from B2G start-up sequence.
      • Kernel modules must be lazy loaded as needed.
      • Any sync waits on daemons must become async. Start-up b2g pieces as daemons finish launching.
      • Minimize start-up initializations.
        • Global statics need to be minimized as their constructors are run before main().
        • Global singletons must be initialized as needed.
  • Homescreen start-up.
    • Minimize _init() code to bare minimum.
    • Maybe freeze the homescreen app into a memory image that can be loaded and unfrozen instead of launching the app every time.
    • Eliminate dependency on enumerating installed apps on launch.
      • Cache the list in local storage?
      • Cache the list in the frozen memory image?
      • Speed up mgmt.getAll()

References

Firefox OS Bootup Procedure