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

[WIP] RS-838 configured CSS chunks #741

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rostyk-kanafotskyy
Copy link
Contributor

@rostyk-kanafotskyy rostyk-kanafotskyy commented Jun 9, 2020

Description:

So here is an example of how chunks can be split up

image

So for every js file, we have CSS chunk.
It works well for separate pages as b2b.home.page
But in other cases it sill causing performance issues in Litehouse:

Before:
image

After:
image

As we can see the loading time increased from 0.15s to 0.45s

In the case of unused CSS, we already have https://cssnano.co/ as a part of ‘OptimizeCSSAssetsPlugin’. So all unused CSS gets removed while building.

Linting:

  • No linting errors

Tests:

  • E2E tests (npm test run with e2e)
  • Manual tests
  • Accessibility tests (no new react-axe errors in console)

Documentation:

  • Requires documentation updates
  • Requires Storybook component updates

@rostyk-kanafotskyy rostyk-kanafotskyy self-assigned this Jun 9, 2020
@shaunmaharaj
Copy link
Contributor

Thank you for capturing this @rostyk-kanafotskyy and trying this out. That's unfortunate that it will increase our load times.
Given the time spent, if our performance is negatively impacted by this, I suggest we capture findings of this attempt within the ticket and we close this as "not fixing".

@aChanEP
Copy link
Contributor

aChanEP commented Jun 10, 2020

Thank you for capturing this @rostyk-kanafotskyy and trying this out. That's unfortunate that it will increase our load times.
Given the time spent, if our performance is negatively impacted by this, I suggest we capture findings of this attempt within the ticket and we close this as "not fixing".

Agree with this. Splitting out the CSS is a valid spike here and we may use it down the line. I guess our app hasn't hit a sizeable amount of CSS yet to warrant chunking for every single css to each bundle. These numbers are odd though... how did splitting out the css to each bundle cause overrall size to grow by 30kb?

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.

3 participants