Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Experiment] [DO NOT MERGE] Improve load performance of App WebWorkers #808

Open
wants to merge 4 commits into
base: master
from

Conversation

Projects
None yet
1 participant
@sohkai
Copy link
Member

commented May 28, 2019

Quick and dirty code to try a couple things out:

  • deb66f0: Move the dataURI transform into a webworker
  • 8f56f3f: Rather than pass a giant (~2-4mb) string back, use an ArrayBuffer
  • 0048d40: Transform the dataURIs one at a time
  • 0cfb581: Start the workers one at a time, and delay them by 1s

Of all of them, it looks like the last one "improves" the experience the most, by hiding some of the jank to after the loader's finished animating. All the other tricks made very little difference in the jank :(.


No matter the attempt, these giant spikes stay :(. Also not sure why the profiler reports them as part of "network". This what the app currently looks like on load (without these changes):

Screen Shot 2019-05-28 at 3 00 49 PM

The big "data:uri" network blobs seem to be causing some trouble; for reference, the scripts have already been downloaded from network previously. Before, when we were passing blobURIs into the WebWorkers, this would take ~30ms (vs. up to 300ms for Finance's script).

Initializing the WebWorker itself doesn't appear to cause much of a problem, it usually finishes within 100ms.

sohkai added some commits May 28, 2019

@sohkai sohkai requested a review from bpierre May 28, 2019

@sohkai sohkai added the blocked label May 28, 2019

@sohkai sohkai changed the title [Experiment] Improve load performance of App WebWorkers [Experiment] [DO NOT MERGE] Improve load performance of App WebWorkers May 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.