Closed Bug 919591 Opened 11 years ago Closed 11 years ago

[Contacts] Defer scripts where possible

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(blocking-b2g:koi+, b2g-v1.2 fixed)

RESOLVED FIXED
1.2 C2(Oct11)
blocking-b2g koi+
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.
Attached file Github pull request
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)
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)
(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)
Comment on attachment 808645 [details] Github pull request Thanks Kevin!
Attachment #808645 - Flags: review?(francisco.jordano) → review+
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [c= p=2 s= u=] → [c= p=2 s=2013.10.04 u=]
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.
Thanks for the profiles Ben!
Awesome :) Thanks for the info Ben
Uplifted 30115b14062c39443528ab8c9a79e7f424178e36 to: v1.2: 96f48b5e0acc8bee3303f0569b699494b06586ab
Target Milestone: --- → 1.2 C2(Oct11)
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.

Attachment

General

Created:
Updated:
Size: