Closed Bug 836363 Opened 12 years ago Closed 12 years ago

[Gaia::Dialer] Delay facebook scripts

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect)

x86
macOS
defect
Not set
normal

Tracking

(blocking-b2g:-, b2g18+ affected, b2g18-v1.0.0 affected, b2g18-v1.0.1 affected)

RESOLVED DUPLICATE of bug 841251
blocking-b2g -
Tracking Status
b2g18 + affected
b2g18-v1.0.0 --- affected
b2g18-v1.0.1 --- affected

People

(Reporter: kgrandon, Assigned: kgrandon)

References

Details

We should be able to make the UI more responsive if we delay the loading of facebook scripts until they are actually needed or after the page is functional. According to the findings in Bug #817052, we should see a gain of 200ms.
Depends on: 836366
No longer depends on: 836366
Whiteboard: [FFOS_perf]
Assignee: nobody → kgrandon
blocking-b2g: --- → tef?
Keywords: perf
Assignee: kgrandon → squibblyflabbetydoo
Let's get a patch ready and landed to v1.x before consider for v1.0.0
tracking-b2g18: --- → +
Jim, can you provide an update on this one?
Based on my tests (mainly using the built-in measurements for startup time), we'll only save about 100ms from this. I'm working on making this lazy-loaded, but I've also been trying to find lower-hanging fruit, since 100ms isn't a very big improvement.
How does this sound for a plan: based on my tests, there are a few things other than the Facebook scripts that we can lazy load (some of them might require a lot of plumbing though). Since the FB scripts are easy to extract (they're only used in dialer/js/contacts.js, as far as I can tell), I'll start by lazy loading the FB stuff in this bug and then file followups to do the other bits if I find some relatively easy wins.
Jim - I think that sounds good. Let's use this bug to track the facebook changes and Bug #836365 to track other scripts/resources that we can lazy load.
Lucky me! I got PR 8000 for this: https://github.com/mozilla-b2g/gaia/pull/8000
Not a blocker, but we'd accept a low risk uplift to v1.0.1 if resolved in time.
blocking-b2g: tef? → -
Batch edit: Bugs marked status-b2g18: affected after 2/13 branching of v1.0.1 are now also status-b2g18-v1.0.1: affected
Checked in. Note that Kevin is working on some followup changes to this (namely, putting the lazy loader in /shared/js) here: https://github.com/mozilla-b2g/gaia/pull/8088/
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Sorry, had to back it out https://github.com/mozilla-b2g/gaia/commit/6d6a280ee7e67f31f1404924d8a2a1042af4c229 This break the lazy l10n. Didn't look in details but the call log is completely broken and the dialogs like the airplane mode warning are not showing up anymore. FYI even with no call log history, if you go to the call log tab you should see the "Call log" title in the header, and the "all" and "missed" sub tabs.
Thank you for backing out, and sorry about that, we'll do better testing next time :) Re-opening this one.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
At this point it just makes sense to handle the patch in the shared LazyLoader pull request, which is here: https://github.com/mozilla-b2g/gaia/pull/8088/. Otherwise, there's going to be a lot of merge issues. I'm going to take this bug as I'm actively working porting the LazyLoader to the shared directory. Etienne - I will mark you as a reviewer of that one once it's well tested. Thanks!
Assignee: squibblyflabbetydoo → kgrandon
The above pull request has landed, and I don't see the same regressions described as above. Marking this one as fixed.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
Apparently fixed by 841251 instead.
Keywords: perf
Resolution: FIXED → DUPLICATE
Whiteboard: [FFOS_perf]
You need to log in before you can comment on or make changes to this bug.