-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Reduce allocations when loading packages from classpath #9587
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
Conversation
115ef1e
to
2f6fa4a
Compare
This is a port of the following PR in scalac: scala/scala#8927
0dae83e
to
cfd2937
Compare
test performance please |
performance test scheduled: 5 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9587/ to see the changes. Benchmarks is based on merging with master (0ff1e2a) |
2a6145a
to
1fd0844
Compare
test performance please |
performance test scheduled: 12 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9587/ to see the changes. Benchmarks is based on merging with master (6e6f67b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM so far. I pushed another commit that uses the new method for more operations.
Correction: I tried to do that but it meant that many name operations needed a Context now, where they need none before.
So, that's problematic. Let's first see whether the additional operations termName(String), typeName(String) need to be called very often. Right now, they are, but that's because of other things that are in the queue to be optimized away. Let's see what remains.
1fe3ba7
to
6ccfdc1
Compare
That way we can keep Contexts out of Names.
I now went the other way and moved the "string slice to name" logic into Decorators. That way we can keep Names |
Reduce allocations when loading packages from classpath
This is a port of the following PR in scalac:
scala/scala#8927