Repository navigation
Bundle size and startup performance discussion for bundler-based integrations #4987
PascalThuet
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I did a small packaging audit of
dash.jswith a focus on bundler-based integrations and lower-end devices such as Smart TVs / STBs.This is not a request to change the current root export immediately.
I am mainly trying to understand whether maintainers would be open to additive package export improvements.
What I measured
Today, the package root ESM import points to the prebuilt monolithic bundle:
package.jsonrootimport->./dist/modern/esm/dash.all.min.jsI measured the following locally on the current development branch:
1. Current root import of
MediaPlayerCurrent published root bundle:
766.8 KB220.4 KBExisting player-only artifact already built by the repo:
dist/modern/esm/dash.mediaplayer.min.js698.1 KB201.6 KBMeasured delta:
-68.7 KBraw-18.8 KBgzip2. Current root import of a very small symbol such as
supportsMediaSourceCurrent published root bundle:
766.8 KB220.4 KBPOC true-ESM closure for
supportsMediaSource:89.7 KB16.8 KBMeasured delta:
-677.1 KBraw-203.6 KBgzip3. Source map proof that the published ESM artifact is already monolithic
Published root bundle source map:
3006.9 KBofsourcesContentPublished player-only bundle source map:
2678.2 KBofsourcesContentSo even the published ESM artifact is already a bundled internal graph, which limits what downstream bundlers can shake.
Why I think this matters
For browser consumers using a script tag, the current setup is fine.
For bundler-based integrators, especially on lower-end hardware:
This seems especially relevant for Smart TV / STB class devices where JS parse/compile time is often noticeable.
Questions
Would you be open to discussing an additive approach such as:
dashjs/mediaplayerdashjs/protectiondashjs/reportingdashjs/offlineI am deliberately not proposing to change the current root export in this discussion.
I only want to check whether additive exports would be considered acceptable.
If this direction sounds reasonable, I can turn the measurements into a more concrete proposal or PR draft.
All reactions