Skip to content

Investigate ways to reduce bundle size on web #1097

@parlough

Description

@parlough

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions