Skip to content

Re-use mapConsumer when resolving multiple call stacks #41

Closed
@mattzeunert

Description

@mattzeunert

Every time pinpoint is called a new SourceMap.SourceMapConsumer object is created. Loading the source map into the consumer object is slow, so for multiple pinpoint calls the mapConsumer should be re-used.

Possible Solution

This change could be made without any changes to the API. However, caching the mapConsumer uses a lot of memory, so maybe this behavior should be opt-in only.

Maybe a cacheMapConsumers boolean could be passed into the StacktraceGPS constructor?

I can submit a PR if we can agree on an API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions