-
-
Notifications
You must be signed in to change notification settings - Fork 638
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
Consider using ClassLoaderCache
in Scala's integration
#4744
Comments
Will give it a shot. Relates to #4477 |
@jvican : Is it still useful entirely within one run? Or is it supposed to be used across multiple |
This is supposed to be used across multiple |
stuhood
pushed a commit
that referenced
this issue
Aug 11, 2017
### Problem While working through #4477, it became obvious that: 1. the performance achieved when the analysis cache is missed is pretty abysmal 2. a `log4j` JMX error was being logged during startup 3. the `forkJava` and `javaHome` settings are redundant: the only reason to pass `javaHome` would be to trigger forking Java 4. a large amount of unnecessary classloading was happening due to #4744 ### Solution 1. Set the default `zinc.analysis.cache.limit` value to `Int.MaxValue`, which will allow users who want to cap the size to set it lower, but otherwise not lead to performance cliffs when a target has more dependencies than the current limit. 2. Implicitly disable log4j JMX usage by setting the `log4j2.disable.jmx` property if it is not already set. 3. Remove the `forkJava` setting, to prepare to use the `javaHome` setting explicitly in #4729 4. Enable usage of `ClassLoaderCache` ### Result Fixes #4744, and removes a few more blockers for #4729.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/cc @stuhood
When I was having a look at the Scala Zinc integration, I've noticed that you don't use the
ClassLoaderCache
when instantiating Scala's incremental compiler:instead of what our default Zinc utils do:
Note the use of
Some
instead ofNone
.Using the classloader cache can provide great speedups, as evidenced by sbt/sbt#2754.
Is this an oversight or have you tried this option in the past and didn't happen to improve performance for Pants?
The text was updated successfully, but these errors were encountered: