-
Notifications
You must be signed in to change notification settings - Fork 31
Support benchmarking of resident compilation #39
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
val command = new CompilerCommand(line split "\\s+" toList, new Settings(scalacError)) | ||
compiler.reporter.reset() | ||
new compiler.Run() compile command.files | ||
} |
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.
the resident
method seems to be unused
can we get a breakdown of the time and memory usage changes on a phase by phase basis, as we have the instrumentation to support this |
@mkeskells To integrate One approach would be to use |
@retronym the -YprofileDestination should work for that that, recording a run sequence no as one of the columns in the standard csv output. Could do a custom recorder but need to work out what to do with GC |
Resident (aka, multi Run) compilation reuses a global, and its symbol table,
for subsequent compilation tasks.
Currently, this mode is only used in the presentation compiler and in the
REPL compiler.
This can lead to significant savings by avoiding re-parsing/-unpickling
class files. We'd expect this to matter more for small compile batches.
Resident compilation currently doesn't have a good for cache invalidation.
If a JAR or .class file is updated, it should throw away part of the symbol
table and re-read the classes.
The data we gather from these benchmarks will help motivate the effort to
add this cache invalidation.
It is also worth remembering that reducing the overhead of small compilation
batches is also useful for projects with large codebases. Zinc compiles small
sets of source files in an incremental compilation session.