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

Optimize MFE Performance #138

Closed
ghassanmas opened this issue Oct 27, 2022 · 1 comment
Closed

Optimize MFE Performance #138

ghassanmas opened this issue Oct 27, 2022 · 1 comment
Labels
epic Large unit of work, consisting of multiple tasks

Comments

@ghassanmas
Copy link
Member

ghassanmas commented Oct 27, 2022

Area of improvment in MFEs can be:

The what

  • Reudcing the file sizes:
    • Elmenate unused CSS (The size of css file is around 1MB, for the learning)
    • Reduce app.hash.js file size (its around 0.5MB)
    • The requried depencs chunk is around 2.5MB (For example checking the learning build, it seems that all users are going JS code realted the frontend-lib-speica-exams, no matter if or not they gonna use it)
    • Can we use preact It's a light weight alternative to react.js
    • Check for unsued JS code
    • Reduce CSS file (An example feat: reduce size CSS output file frontend-build#266 Still need futher testing though)
    • Check for unsued Assets
      • Do paragon icons have all to be preloaded, checking bundle analyzer (its around 0.5MB)
      • Are Paragon componenets being Tree Chaked

The How (Not an exlusive list,)

  • Do you utilize Code Splitting/Dynamic Import when is an opportunity for, this can be ensuring code logic for uncommon use cases is only loaded when it needs to, Here are some examples which might be already taken account of
  • Use Webpack plugins to reduce code size
  • Serve encoded/zipped version of assets file (This has be done with tutor form the latest release)
  • Can we have a common assets than loads from CDN from common depends:
    • This solution might be optimize perforamce when going to one MFE but rather when user browse between them (Which somehting very common I assume_)
    • This might go in line with Discovery: Faster build tool #126, since in theoray we shouldn't need to compile the commons aseets for every MFE
    • Another way of doing this can be Module Fedeartion

How to test

Other Notes

ghassanmas added a commit to ghassanmas/frontend-build that referenced this issue Oct 27, 2022
 The added plugin, reduce the CSS file by removing unused CSS
 The plugin is kinda recommended by bootstrap[^1], reducing
 unused CSS is generally recommended as well enchance web
 perforamce[^2]

 [^1]: https://getbootstrap.com/docs/5.2/customize/optimize/#unused-css
 [^2]: https://web.dev/css-web-vitals/#critical-css

 Related issue: openedx/wg-frontend/issues/138
ghassanmas added a commit to ghassanmas/frontend-build that referenced this issue Oct 27, 2022
 The added plugin, reduce the CSS file by removing unused CSS
 The plugin is kinda recommended by bootstrap[^1], reducing
 unused CSS is generally recommended as well enchance web
 perforamce[^2]

 [^1]: https://getbootstrap.com/docs/5.2/customize/optimize/#unused-css
 [^2]: https://web.dev/css-web-vitals/#critical-css

 Related issue: openedx/wg-frontend/issues/138
@arbrandes arbrandes added the epic Large unit of work, consisting of multiple tasks label Oct 27, 2022
ghassanmas added a commit to ghassanmas/frontend-build that referenced this issue Jan 18, 2023
 The added plugin, reduce the CSS file by removing unused CSS
 The plugin is kinda recommended by bootstrap[^1], reducing
 unused CSS is generally recommended as well enchance web
 perforamce[^2]

 [^1]: https://getbootstrap.com/docs/5.2/customize/optimize/#unused-css
 [^2]: https://web.dev/css-web-vitals/#critical-css

 Related issue: openedx/wg-frontend/issues/138
ghassanmas added a commit to ghassanmas/frontend-build that referenced this issue Jan 18, 2023
 The added plugin, reduce the CSS file by removing unused CSS
 The plugin is kinda recommended by bootstrap[^1], reducing
 unused CSS is generally recommended as well enchance web
 perforamce[^2]

 [^1]: https://getbootstrap.com/docs/5.2/customize/optimize/#unused-css
 [^2]: https://web.dev/css-web-vitals/#critical-css

 Related issue: openedx/wg-frontend/issues/138
ghassanmas added a commit to ghassanmas/frontend-build that referenced this issue Mar 14, 2023
 The added plugin, reduce the CSS file by removing unused CSS
 The plugin is kinda recommended by bootstrap[^1], reducing
 unused CSS is generally recommended as well enchance web
 perforamce[^2]

 [^1]: https://getbootstrap.com/docs/5.2/customize/optimize/#unused-css
 [^2]: https://web.dev/css-web-vitals/#critical-css

 Related issue: openedx/wg-frontend/issues/138
ghassanmas added a commit to ghassanmas/frontend-build that referenced this issue Mar 22, 2023
 The added plugin, reduce the CSS file by removing unused CSS
 The plugin is kinda recommended by bootstrap[^1], reducing
 unused CSS is generally recommended as well enchance web
 perforamce[^2]

 [^1]: https://getbootstrap.com/docs/5.2/customize/optimize/#unused-css
 [^2]: https://web.dev/css-web-vitals/#critical-css

 Related issue: openedx/wg-frontend/issues/138
ghassanmas added a commit to ghassanmas/frontend-build that referenced this issue Mar 28, 2023
 The added plugin, reduce the CSS file by removing unused CSS
 The plugin is kinda recommended by bootstrap[^1], reducing
 unused CSS is generally recommended as well enchance web
 perforamce[^2]

 [^1]: https://getbootstrap.com/docs/5.2/customize/optimize/#unused-css
 [^2]: https://web.dev/css-web-vitals/#critical-css

 Related issue: openedx/wg-frontend/issues/138
@arbrandes arbrandes changed the title Optimize MFE Perforamce Optimize MFE Performance Jun 14, 2023
@arbrandes
Copy link

Closing in favor of #173.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Large unit of work, consisting of multiple tasks
Projects
Status: Closed
Development

No branches or pull requests

2 participants