Skip to content

[cfe] Option to omit details in Source objects from Component.uriToSource #62110

@mkustermann

Description

@mkustermann

Some backends may require Component.uriToSource for example for translating offsets to line/col numbers, which requires Source.lineStarts but it does not require the actual source.

I've looked at the RAM consumption when compiling a big app with dart2wasm and we're using 400 MB of RAM for storing the Uint8List of the source even though we don't need it (after CFE is done)

It seems also that Source.constantCoverageConstructors is populated even though we don't really need that information (though this is relatively small amount of memory)

/cc @jensjoha (not sure which area- label to apply here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions