minimize a few large libraries to start speeding up Hello standalone page load

RESOLVED FIXED in Firefox 44

Status

Hello (Loop)
Client
P2
normal
Rank:
28
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: dmose, Assigned: dmose)

Tracking

({perf})

unspecified
mozilla44
Points:
2

Firefox Tracking Flags

(firefox44 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
This needs to be applied on top of bug 1188509, and minifies the OpenTok SDK and lodash, shrinking the size of the overload JS to be loaded from ~2.3M to ~1.3M.  

I've added gzip compression to our dev-server so that it's possible to test performance in an environment substantially more similar to production.

These changes have sliced average load time on using Chrome DevTools throttling to 2Mb DSL from ~3.7 seconds down to ~1.8ish seconds.  Slower connections are likely to have even bigger wins.  Presumably, the production servers will perform similarly.

There's lots more low-hanging fruit here for future bugs.
(Assignee)

Comment 1

3 years ago
Created attachment 8666231 [details] [diff] [review]
minify OpenTok SDK and lodash for faster Hello standalone load times
Attachment #8666231 - Flags: review?(standard8)
(Assignee)

Updated

3 years ago
Assignee: nobody → dmose
Rank: 28
Comment on attachment 8666231 [details] [diff] [review]
minify OpenTok SDK and lodash for faster Hello standalone load times

Review of attachment 8666231 [details] [diff] [review]:
-----------------------------------------------------------------

Ok, this is good for me. However, we need to check that TokBox are happy with us shipping the minified version on standalone before we can land this. I'll ask Michael in a moment.
Attachment #8666231 - Flags: review?(standard8) → review+
Michael, are you happy with us shipping a minified version of the sdk with our standalone UI?

We'd prefer to minify it ourselves as it provides an easier audit route, obviously the source control version will remain as the one that you supply us.
Flags: needinfo?(msander)

Comment 4

3 years ago
Yes, please go ahead and minify it.

(In reply to Mark Banner (:standard8) from comment #3)
> Michael, are you happy with us shipping a minified version of the sdk with
> our standalone UI?
> 
> We'd prefer to minify it ourselves as it provides an easier audit route,
> obviously the source control version will remain as the one that you supply
> us.
Flags: needinfo?(msander)
(Assignee)

Comment 5

3 years ago
Great, thanks!  Just for posterity, another win for us doing the minification is that once we have all of our stuff run through the minifier, Uglify will be able to do dead-code elimination, which will shrink things even further.
https://hg.mozilla.org/mozilla-central/rev/21015383ac41
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44

Updated

3 years ago
Iteration: --- → 44.1 - Oct 5
You need to log in before you can comment on or make changes to this bug.