Closed
Bug 919591
Opened 11 years ago
Closed 11 years ago
[Contacts] Defer scripts where possible
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect, P1)
Tracking
(blocking-b2g:koi+, b2g-v1.2 fixed)
Tracking | Status | |
---|---|---|
b2g-v1.2 | --- | fixed |
People
(Reporter: kgrandon, Assigned: kgrandon)
References
Details
(Keywords: perf, Whiteboard: [c= p=2 s=2013.10.04 u=1.2])
Attachments
(1 file)
Non-deferred scripts may block with the HTML parser, we should defer them where possible.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 808645 [details]
Github pull request
Hey - could one of you guys review this quick patch? Thanks!
Attachment #808645 -
Flags: review?(francisco.jordano)
Attachment #808645 -
Flags: review?(21)
Comment 3•11 years ago
|
||
Hi Kevin,
this is a bit weird for me, the scripts already include the |defer| attribute, is there any bug that prevent the script to be deferred for having |type| attribute?
Maybe I'm missing something :S
Flags: needinfo?(kgrandon)
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Francisco Jordano [:arcturus] from comment #3)
> Hi Kevin,
>
> this is a bit weird for me, the scripts already include the |defer|
> attribute, is there any bug that prevent the script to be deferred for
> having |type| attribute?
>
> Maybe I'm missing something :S
Hi Francisco,
Sorry or the confusing pull request! The defer attribute was added to l10n and l10n_date libraries. The type attribute was removed becuase it is not needed. These are two conventions that we use in other Gaia apps. This should result in a tiny perf boost. Let me know of you have any other questions, thanks!
Flags: needinfo?(kgrandon)
Attachment #808645 -
Flags: review?(21) → review+
Comment 5•11 years ago
|
||
Comment on attachment 808645 [details]
Github pull request
Thanks Kevin!
Attachment #808645 -
Flags: review?(francisco.jordano) → review+
Assignee | ||
Comment 6•11 years ago
|
||
Thanks for the quick reviews! Landed in master: https://github.com/mozilla-b2g/gaia/commit/30115b14062c39443528ab8c9a79e7f424178e36
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•11 years ago
|
Whiteboard: [c= p=2 s= u=] → [c= p=2 s=2013.10.04 u=]
Comment 7•11 years ago
|
||
For what its worth, I was concerned that this might have caused an extra reflow, so I took a couple profiles:
Before:
http://people.mozilla.org/~bgirard/cleopatra/#report=0bfe988bac496ba7a7e09f8cc2e3623099ca0afe
After:
http://people.mozilla.org/~bgirard/cleopatra/#report=cc2f0dacb5a5f188c21ea1b2d08631dfd98190e2
I don't see any reflow regression. As expected the static loading in html5::RunFlushLoop() improved from 400+ms to ~350ms.
Just including the profiles here in case anyone wants to look at them.
Assignee | ||
Comment 8•11 years ago
|
||
Thanks for the profiles Ben!
Comment 9•11 years ago
|
||
Awesome :)
Thanks for the info Ben
Comment 10•11 years ago
|
||
Uplifted 30115b14062c39443528ab8c9a79e7f424178e36 to:
v1.2: 96f48b5e0acc8bee3303f0569b699494b06586ab
status-b2g-v1.2:
--- → fixed
Updated•11 years ago
|
Target Milestone: --- → 1.2 C2(Oct11)
Updated•11 years ago
|
Whiteboard: [c= p=2 s=2013.10.04 u=] → [c= p=2 s=2013.10.04 u=1.2]
You need to log in
before you can comment on or make changes to this bug.
Description
•