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

Maximize sharing of NormalizedFilePath values in getLocatedImports #1996

Merged
merged 1 commit into from Jul 3, 2021

Conversation

pepeiborra
Copy link
Collaborator

The goal is to avoid having multiple copies of the same NormalizedFilePath value in the heap.

A previous attempt was using hash consing (haskell/lsp#340) but I think this small change should be enough.

@pepeiborra
Copy link
Collaborator Author

The benchmarks show consistent heap savings of at least 5MB for the Cabal example (around 2.5%). That should scale up nicely in larger projects with thousands of modules.

@pepeiborra pepeiborra marked this pull request as ready for review July 3, 2021 15:01
Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank for this nice improvement

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.

None yet

2 participants