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

perf(vite): chunk webcams, locales and large libraries #1578

Merged
merged 1 commit into from
Oct 7, 2023

Conversation

pataar
Copy link
Member

@pataar pataar commented Oct 2, 2023

Description

This changes the following:

  • Upgrade vite to version 4
  • Correctly chunk the webcam streamers
    • These weren't loaded dynamically although it looked like it
  • Chunk all the locale files
    • This way only the required locale file is loaded for the user
  • Chunk large libraries
    • These libraries don't change often, and can be cached better
  • Removes sass from the project, and replaces it with postcss-nesting

@pataar pataar added the analyze runs build size report label Oct 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2023

Size Change: +5.72 kB (0%)

Total Size: 2.01 MB

Filename Size Change
./dist/assets/Codemirror.js 0 B -23 kB (removed) 🏆
./dist/assets/Heightmap.css 0 B -283 B (removed) 🏆
./dist/assets/Heightmap.js 0 B -139 kB (removed) 🏆
./dist/assets/index.js 0 B -1.21 MB (removed) 🏆
./dist/assets/index.css 0 B -65.7 kB (removed) 🏆
./dist/assets/Viewer.css 0 B -297 B (removed) 🏆
./dist/assets/Viewer.js 0 B -432 kB (removed) 🏆
./dist/assets/virtual_pwa-179bbc70.js 0 B -432 B (removed) 🏆
./dist/assets/workbox-window.prod.es5.js 0 B -2.2 kB (removed) 🏆
./dist/index.html 785 B +91 B (+13%) ⚠️
./dist/sw.js 1.98 kB +466 B (+31%) 🚨
./dist/assets/codemirror-js 134 kB +134 kB (new file) 🆕
./dist/assets/Codemirror-js 4.07 kB +4.07 kB (new file) 🆕
./dist/assets/cz-js 13.6 kB +13.6 kB (new file) 🆕
./dist/assets/da-js 12.4 kB +12.4 kB (new file) 🆕
./dist/assets/de-js 15 kB +15 kB (new file) 🆕
./dist/assets/echarts-js 198 kB +198 kB (new file) 🆕
./dist/assets/es-js 14.7 kB +14.7 kB (new file) 🆕
./dist/assets/fr-js 13.1 kB +13.1 kB (new file) 🆕
./dist/assets/Heightmap-css 283 B +283 B (new file) 🆕
./dist/assets/Heightmap-js 121 kB +121 kB (new file) 🆕
./dist/assets/Hlsstreamer-js 110 kB +110 kB (new file) 🆕
./dist/assets/Hlsstreamer-css 62 B +62 B (new file) 🆕
./dist/assets/hu-js 12.3 kB +12.3 kB (new file) 🆕
./dist/assets/index-js 337 kB +337 kB (new file) 🆕
./dist/assets/index-css 7.61 kB +7.61 kB (new file) 🆕
./dist/assets/Ipstreamer-js 781 B +781 B (new file) 🆕
./dist/assets/Ipstreamer-css 62 B +62 B (new file) 🆕
./dist/assets/it-js 9.58 kB +9.58 kB (new file) 🆕
./dist/assets/ja-js 13.6 kB +13.6 kB (new file) 🆕
./dist/assets/JanusStreamer-css 105 B +105 B (new file) 🆕
./dist/assets/JanusStreamer-js 62.9 kB +62.9 kB (new file) 🆕
./dist/assets/JMuxerStream-js 11.4 kB +11.4 kB (new file) 🆕
./dist/assets/JMuxerStream-css 99 B +99 B (new file) 🆕
./dist/assets/ko-js 14 kB +14 kB (new file) 🆕
./dist/assets/Mjpegstreamer-css 188 B +188 B (new file) 🆕
./dist/assets/Mjpegstreamer-js 1.92 kB +1.92 kB (new file) 🆕
./dist/assets/MjpegstreamerAdaptive-css 178 B +178 B (new file) 🆕
./dist/assets/MjpegstreamerAdaptive-js 2.08 kB +2.08 kB (new file) 🆕
./dist/assets/nl-js 12.6 kB +12.6 kB (new file) 🆕
./dist/assets/overlayscrollbars-js 25 kB +25 kB (new file) 🆕
./dist/assets/overlayscrollbars-css 4.52 kB +4.52 kB (new file) 🆕
./dist/assets/pl-js 15.2 kB +15.2 kB (new file) 🆕
./dist/assets/pt-js 13.6 kB +13.6 kB (new file) 🆕
./dist/assets/ru-js 15.6 kB +15.6 kB (new file) 🆕
./dist/assets/sv-js 10.5 kB +10.5 kB (new file) 🆕
./dist/assets/tr-js 14.8 kB +14.8 kB (new file) 🆕
./dist/assets/uk-js 14.4 kB +14.4 kB (new file) 🆕
./dist/assets/Uv4lMjpeg-js 1.2 kB +1.2 kB (new file) 🆕
./dist/assets/Uv4lMjpeg-css 83 B +83 B (new file) 🆕
./dist/assets/Viewer-js 432 kB +432 kB (new file) 🆕
./dist/assets/Viewer-css 297 B +297 B (new file) 🆕
./dist/assets/virtual_pwa-register-js 487 B +487 B (new file) 🆕
./dist/assets/vuetify-js 105 kB +105 kB (new file) 🆕
./dist/assets/vuetify-css 64.5 kB +64.5 kB (new file) 🆕
./dist/assets/WebrtcCameraStreamer-js 1.81 kB +1.81 kB (new file) 🆕
./dist/assets/WebrtcCameraStreamer-css 105 B +105 B (new file) 🆕
./dist/assets/WebrtcMediaMTX-css 104 B +104 B (new file) 🆕
./dist/assets/WebrtcMediaMTX-js 2.51 kB +2.51 kB (new file) 🆕
./dist/assets/workbox-window.prod.es5-js 2.19 kB +2.19 kB (new file) 🆕
./dist/assets/zh_TW-js 12.9 kB +12.9 kB (new file) 🆕
./dist/assets/zh-js 14.6 kB +14.6 kB (new file) 🆕
ℹ️ View Unchanged
Filename Size
./dist/config.json 101 B
./dist/fonts/roboto-black.woff2 11 kB
./dist/fonts/roboto-bold.woff2 11 kB
./dist/fonts/roboto-light.woff2 11.2 kB
./dist/fonts/roboto-medium.woff2 11.1 kB
./dist/fonts/roboto-regular.woff2 11 kB
./dist/fonts/roboto-thin.woff2 11 kB
./dist/img/icons/apple-touch-icon-180x180.png 6.47 kB
./dist/img/icons/favicon-16x16.png 355 B
./dist/img/icons/favicon-32x32.png 641 B
./dist/img/icons/icon-192-png 7.86 kB
./dist/img/icons/icon-512-png 33 kB
./dist/img/icons/mstile-150x150.png 2.24 kB
./dist/img/icons/safari-pinned-tab.svg 1.38 kB
./dist/img/klipper.svg 2.38 kB
./dist/img/logo.svg 295 B
./dist/img/sidebar-background.svg 929 B
./dist/release_info.json 79 B
./dist/workbox-js 5.32 kB

compressed-size-action

@pataar pataar requested a review from meteyou October 2, 2023 22:15
@pataar pataar marked this pull request as ready for review October 2, 2023 22:15
@pataar pataar changed the title perf(vite): improve chunking perf(vite): chunk webcams, locales and large libraries Oct 2, 2023
formatting

revert custom env

lock

resolve postcss parsing

prettier
@pataar pataar force-pushed the feature/improve_chunking branch from 74f600b to 2ea66a1 Compare October 7, 2023 20:27
@meteyou meteyou merged commit 3212234 into mainsail-crew:develop Oct 7, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyze runs build size report
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants