Closed Bug 957913 Opened 12 years ago Closed 12 years ago

Make Load Settings Connectivity.js::Init Async for Performance Improvements

Categories

(Firefox OS Graveyard :: Gaia::Settings, defect, P1)

x86
macOS
defect

Tracking

(blocking-b2g:1.3+, b2g-v1.3 fixed, b2g-v1.3T fixed, b2g-v1.4 fixed)

RESOLVED FIXED
1.3 C2/1.4 S2(17jan)
blocking-b2g 1.3+
Tracking Status
b2g-v1.3 --- fixed
b2g-v1.3T --- fixed
b2g-v1.4 --- fixed

People

(Reporter: mchang, Assigned: mchang)

References

Details

(Keywords: perf, Whiteboard: [c=handeye p=2 s= u=])

Attachments

(3 files, 2 obsolete files)

The Connectivity.js::Init takes 28 ms to execute. Async load sub-parts to improve performance and spread the work over a few more seconds and back loaded on the event loop. This allows the layout engine to rasterize more frequently and improve startup settings scrolling performance.
Attached file Profile to Setting App
After the initial load, we see that we spend 28 ms in Connectivity.js::Init
This is also necessary for 922658, and one of the harder things to lazy load.
Blocks: 922658
Attached file Profile w/ Patch
We go from 28ms to 7 ms for the wifi portion of the init() method to be detectable by the profiler. We also see that the next frame is rendered 63 ms later rather than 108 ms, which should save us ~45 ms of jank.
Attachment #8357568 - Attachment is obsolete: true
Attachment #8357592 - Flags: review?(kaze)
Comment on attachment 8357592 [details] [review] https://github.com/mozilla-b2g/gaia/pull/15129 The bug title might be confusing… This patch does not lazy-load connectivity.js, it just makes the initialization asynchronous. If that’s what we want then it’s fine (see my nits on the PR though).
Summary: Lazy Load Settings Connectivity.js::Init for Performance Improvements → Make Load Settings Connectivity.js::Init Async for Performance Improvements
Fixed the bugs and the title.
Attachment #8357592 - Attachment is obsolete: true
Attachment #8357592 - Flags: review?(kaze)
Attachment #8357976 - Flags: review?(kaze)
Attachment #8357976 - Flags: review?(kaze) → review+
Landed. Uplifted to v1.3: 38f9d70fe6bec760a56271a4789e63f202440919
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Requesting v1.3+ status as this solved bug 951221.
blocking-b2g: --- → 1.3?
blocking-b2g: 1.3? → 1.3+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: