Skip to content

Conversation

@connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented Oct 11, 2019

Lightrider doesn't support HTML output, so the entire assets module can be ignored.

7.01 MB -> 6.77 MB (3%) (the JS is much smaller now thanks to @wardpeet, so the impact is minimal)

@patrickhulce
Copy link
Collaborator

7.01 MB -> 6.77 MB (3%)

I'm sorry does this mean the lightrider bundle is 7 MB!? 😱

@connorjclark
Copy link
Collaborator Author

locales are very heavy :(

@connorjclark connorjclark changed the title client(lightrider): don't include html report assets in bundle client(lr): don't include html report assets in bundle Oct 11, 2019
@connorjclark connorjclark changed the title client(lr): don't include html report assets in bundle clients(lr): don't include html report assets in bundle Oct 11, 2019
@connorjclark
Copy link
Collaborator Author

it takes 80ms for node to parse the locales :P

@exterkamp and I agree it's not worth the complexity to split those off (like we are doing for devtools).

@paulirish
Copy link
Member

it takes 80ms for node to parse the locales :P

we could use this pattern to probably speed that up. https://v8.dev/blog/cost-of-javascript-2019#json

(we'd want to do it after the refactors starting in jon's PR though)

@connorjclark
Copy link
Collaborator Author

was curious about the breakdown for all that locale data in terms of processing time. did some tests:

+30ms for parsing the bundle
+60ms for evaluating locales.js (the require)

So it seems 1/3 the cost of JSON-in-JS is attributable to parsing, and 2/3 is attributable to execution. I'd see how much the execution goes down for JSON.parse, but I don't know off-hand how to do that for browserify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants