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

Get rid of global token cache, fixes #1068 #1914

Merged
merged 2 commits into from Nov 27, 2019
Merged

Conversation

@olafurpg
Copy link
Member

olafurpg commented Nov 27, 2019

Previously, Scalameta kept a global cache for the tokens of all inputs.
Now, the global cache has been replaced with a cache that's local to the
input itself.

The new solution was not possible before #1863 since the Input type
was kept in a separate module from Tokens. Now the two types live in
the same module so it's possible to make the token cache local to
inputs.

I verified that this change does not regress the performance of
Scalafmt.

olafurpg added 2 commits Nov 27, 2019
Previously, Scalameta kept a global cache for the tokens of all inputs.
Now, the global cache has been replaced with a cache that's local to the
input itself.

The new solution was not possible before #1863 since the `Input` type
was kept in a separate module from `Tokens`. Now the two types live in
the same module so it's possible to make the token cache local to
inputs.

I verified that this change does not regress the performance of
Scalafmt.
@olafurpg olafurpg merged commit 6e11bbb into scalameta:master Nov 27, 2019
3 checks passed
3 checks passed
Check
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@olafurpg olafurpg deleted the olafurpg:megacache branch Nov 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.