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

Smaller bundle size: implement split chunks + tree shake + minification #6333

Closed
emansom opened this issue Apr 16, 2024 · 2 comments
Closed

Comments

@emansom
Copy link
Contributor

emansom commented Apr 16, 2024

Describe the problem to be solved

Currently there are bundles in the frontend that've grown to ridiculous sizes of 1MB+.

This leads to considerable slow down in page loading speed if the bandwidth of the client is limited for bandwidth saving, or if the client is on slow cellular data.

On my instance I'd like to limit the bandwidth per connection to 1Mbit/s (or even lower if applicable) to ensure there's max capacity for the live video being broadcasted @ 10Mbps bitrate with ~150ish viewers on a gigabit link.

The WebRTC sharing should mitigate that risk, however I'd like to cover all potential SPOFs: Murphy had a point you know.

Please note that the NGINX config PeerTube provides denotes units in bytes, not bits: currently it allows for 800KB * 8 = 6.4Mbit/s on the pages by default.

Describe the solution you would like

The build process for the frontend to split chunks, tree shake and minimize to ensure faster page loading on slower connections.

Or an even better way if there's one. Haven't kept up with the latest in minification.

@Chocobozzz
Copy link
Owner

Hello,

We already do all this stuff, and continuously improve chunks splitting/tree shacking (for example by moving to standalone components: 5e041ff)

Please create dedicated issues if you notice a specific work we can do to decrease front-end initial size.

@emansom
Copy link
Contributor Author

emansom commented Apr 22, 2024

We already do all this stuff, and continuously improve chunks splitting/tree shacking (for example by moving to standalone components: 5e041ff)

Wasn't aware this was already implemented in the latest release candidate. Will test!

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

No branches or pull requests

2 participants