Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a proof of concept only and needs further discussion.
When running checkstyle via maven plugin, it's really easy to use the cacheFile mechanism for more speed. In the eclipse plugin, there is no caching enabled for checkstyle core (the plugin only caches some of its own configuration files and similar). This leads to very long runtime in case of clean builds (because all files will be scanned again then, independent of whether there are actual changes). I have some workspace where checkstyle consumes 20 minutes of CPU time on clean builds.
This change enables the cacheFile mechanism in checkstyle core. It uses a single cachefile for all checkers, which is stored in the ".metadata" folder belonging to a workspace. That way the cachefile is not visible in the workspace itself, and every workspace has its own persistent cachefile, without using any global temp directories or similar.
The cache is not configurable and always enabled. It can be invalidated with the already existing "Purge checkstyle caches" action (hit Ctrl-3, start typing "purge").
The effect of the cache can be seen best when using the context menu on a large project to invoke checkstyle on it. Without the cache that always takes the same time, with a visible job in the progress view. With the cache the first invocation takes that same long time, every additional invocation on an already checked project is super-fast (in fact, I don't see a job anymore in the progress view in most cases because the job is finished more quickly then the progress view updates).
Open issues: