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

Investigate ways to reduce bundle size on web #1097

Open
parlough opened this issue Jan 1, 2024 · 0 comments
Open

Investigate ways to reduce bundle size on web #1097

parlough opened this issue Jan 1, 2024 · 0 comments
Labels
package:http type-enhancement A request for a change that isn't a bug

Comments

@parlough
Copy link
Member

parlough commented Jan 1, 2024

Since we now recommend package:http as instead of the web specific APIs, we should investigate ways to reduce the bundle size added by using the package.

Using just the top-level read function in dart-lang/dartdoc@a845d39, increased my -O4 bundle size by 75KB.

A lot of this comes from the internal use of MediaType from package:http_parser and its dependencies for parsing (package:source_span). Particularly package:source_span and its highlighting, reporting, and prettifying Uris.

Windows Uri parsing is showing up a bit despite being unused as well. I opened dart-lang/sdk#54474 to track a fix for this in the core libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:http type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

1 participant