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

ref: Make SourceMap::adjust_mappings work in place #70

Merged
merged 2 commits into from
Sep 6, 2023

Conversation

loewenheim
Copy link
Contributor

This changes SourceMap::adjust_mappings to a method that mutates its receiver instead of a function that creates a new SourceMap out of references. This avoids a bunch of cloning of source contents and brings a marked performance improvement in my (local, nonscientific) injection tests.

This would require a major release.

@loewenheim loewenheim self-assigned this Aug 28, 2023
src/types.rs Outdated Show resolved Hide resolved
@loewenheim loewenheim merged commit 2f1a4e9 into master Sep 6, 2023
4 checks passed
@loewenheim loewenheim deleted the ref/adjust-inplace branch September 6, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants