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

Performance observations (sbt 1.0 startup performance) #3694

Closed
jrudolph opened this issue Oct 30, 2017 · 3 comments
Closed

Performance observations (sbt 1.0 startup performance) #3694

jrudolph opened this issue Oct 30, 2017 · 3 comments

Comments

@jrudolph
Copy link
Member

Here's an adhoc observation I've seen in a flamegraph I recently captured with async-profiler during startup of sbt. On runs where all .sbt files should already have been compiled, they still seem to be parsed which is where quite some time is spent because a compiler instance needs to be initialized for that (with all the classloading that happens because of that).

Another hotspot seems to be json deserialization of caches. Might make sense to optimize at least big caches like classpaths to use something better performing than json serialization.

flamegraph-akka-http-sbt.svg.txt

@jvican
Copy link
Member

jvican commented Feb 8, 2018

On runs where all .sbt files should already have been compiled, they still seem to be parsed which is where quite some time is spent because a compiler instance needs to be initialized for that (with all the classloading that happens because of that).

To the best of my knowledge this is the intended behaviour. Sbt caches at the statement level because it hoists up every statement to its own class -- I cannot think of a way we can remove that without changing the whole evaluation algorithm. You can check this in the .config-classes directory typically placed in project/target.

@jrudolph
Copy link
Member Author

Superseded by #4012.

@jrudolph
Copy link
Member Author

I cannot think of a way we can remove that without changing the whole evaluation algorithm

It was possible to do that by just introducing another layer of caching just for the result of splitExpressions. See jrudolph@b7a9f74.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants