Skip to content

App load order tweaks for code splitting#13032

Merged
t3chguy merged 10 commits intodevelopfrom
t3chguy/app_load1
Apr 7, 2020
Merged

App load order tweaks for code splitting#13032
t3chguy merged 10 commits intodevelopfrom
t3chguy/app_load1

Conversation

@t3chguy
Copy link
Copy Markdown
Member

@t3chguy t3chguy commented Apr 4, 2020

Requires matrix-org/matrix-react-sdk#4343

No bundle size change, but much better split.

image

the bundle circled in red is the entrypoint bundle.js (just 27.81kb) which means that our modernizr self check can be done much quicker while the other key bundles preload and also much less possibly incompatible code is executed.

The largest bundle here, vendors~init.js (4.99mb) is also the most cachable as it consists of majority of the node_modules of the 3 layers.

Phase 2 of ~4 towards the multitude of app load related issues. This has only has one functional change for incompatible browser handling, the mobile_guide check&redirect is done in the index.ts which is the safest part of the app, using the least advanced features.

image

the node_modules here is just the querystring library necessary for part of the mobile_guide redirect check.

t3chguy added 6 commits April 4, 2020 17:21
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy marked this pull request as ready for review April 4, 2020 23:22
@t3chguy t3chguy requested a review from a team April 4, 2020 23:22
t3chguy added 2 commits April 5, 2020 00:27
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
…ove mobile_guide redirect to index.ts

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy
Copy link
Copy Markdown
Member Author

t3chguy commented Apr 5, 2020

Code Splitting seems to have a reasonable performance improvement, the majority of future improvements will come from parallelizing loading where possible.

Chrome performance test results (5 rounds, ms)

after PR:  2636 2421 4812 4651 4987
before PR: 5133 5735 5607 5567 5618

@bwindels bwindels requested review from bwindels and removed request for a team April 6, 2020 10:42
Copy link
Copy Markdown
Contributor

@bwindels bwindels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good, just a question about the webpack annotations.

Comment thread yarn.lock
Comment thread src/vector/init.ts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy requested a review from bwindels April 6, 2020 11:22
@t3chguy
Copy link
Copy Markdown
Member Author

t3chguy commented Apr 6, 2020

Sorry small tweak as two async imports in one spot made me a little sad

Actually this ended up confusing webpack and creating a 20kB overhead so reverting and merging at the state it was previously approved in.

@t3chguy t3chguy removed the request for review from bwindels April 6, 2020 11:24
This reverts commit e788433

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy merged commit 06bd9d1 into develop Apr 7, 2020
@t3chguy t3chguy deleted the t3chguy/app_load1 branch May 12, 2022 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants