Skip to content
New issue

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

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

Already on GitHub? # to your account

performance optimizations #834

Open
3 tasks
sgfost opened this issue Dec 29, 2022 · 1 comment
Open
3 tasks

performance optimizations #834

sgfost opened this issue Dec 29, 2022 · 1 comment
Labels

Comments

@sgfost
Copy link
Contributor

sgfost commented Dec 29, 2022

Remaining client-side tasks:

  • lodash tree shaking (only import what we are using)
  • bootstrap-vue icons tree shaking (some issue there, needs to be looked into)
  • code splitting (potentially deliver the game ui in a separate bundle and add a loading screen for when this happens)

Server performance needs to be looked at independently (sentry performance monitoring, game server load testing, etc.)

previous performance related issues:
#788
#666


Treemap of the gzipped bundle:

js/chunk-vendors.js (4.42 MB)
js/app.js (639.7 KB)

image

  • font awesome is the most obvious thing to be dealt with, 1.3 MB compressed for 10 or so icons
  • (all of) lodash is included twice (client and shared)
  • may be worth looking into only bundling used icons from bootstrap-vue

webpack chunk splitting: https://webpack.js.org/plugins/split-chunks-plugin/

lazy loading routes (for splitting game components from web content): https://v3.router.vuejs.org/guide/advanced/lazy-loading.html#lazy-loading-routes

@sgfost sgfost added backlog client Client Side refactor and removed backlog labels Dec 29, 2022
sgfost added a commit that referenced this issue Dec 30, 2022
- fully replaced remaining fa icons with bootstrap equivalents
- standardized icons to use individual components rather than the BIcon
  helper component

* attempt to do some tree shaking and only bundle the bootstrap icons we
  are using failed, need to revisit later

ref #834
@sgfost
Copy link
Contributor Author

sgfost commented Dec 30, 2022

Down to ~2.7mb after cleaning up icons and extraneous lodash include. Good enough for now until we monitor performance in prod.

remaining refactors:

  • lodash tree shaking (only import what we are using)
  • bootstrap-vue icons tree shaking (some issue there, needs to be looked into)
  • code splitting

@sgfost sgfost added the backlog label Dec 30, 2022
@sgfost sgfost changed the title reduce js payload size performance optimizations Jan 3, 2023
@sgfost sgfost removed the backlog label Jan 3, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant