-
Notifications
You must be signed in to change notification settings - Fork 459
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
Fix resource leak in Maven plugin #571
Commits on Jun 27, 2020
-
NPM formatters changed to have their signatures based on package.json…
… file instead of the whole node_modules directory.
Configuration menu - View commit details
-
Copy full SHA for b695622 - Browse repository at this point
Copy the full SHA b695622View commit details -
Fix resource leak in Maven plugin
The resource leak increased the number of threads with every execution of Exclipse-based formatter step in a Maven module. It happened because the `SpotlessCache` wasn't properly utilized. Every cache key was based on randomized file names because Maven plugin relocates config files into the target directory with a random file name. This resulted in all cache accesses being cache misses. This commit fixes the problem by: * making the Maven plugin use non-random file names for output files. `FileLocator` is changed to construct names based on a hash of the input path. Input path can be a URL, file in a JAR, or a regular local file * changing `FileSignature` (used for `SpotlessCache` keys) to use filenames instead of paths and file hashes instead of last modified timestamps These two changes allow `FileSignature` to uniquely identify a set of files by their content and not take file paths into account. As a result, created keys for `SpotlessCache` are properly comparable which results in lots of cache hits and decreased number of created threads. Changed `FileSignature` only accepts files, not directories.
Configuration menu - View commit details
-
Copy full SHA for 823c2c3 - Browse repository at this point
Copy the full SHA 823c2c3View commit details -
Use a central cache for the FileSignature, so that we keep the local …
…performance based on lastModified that we had prior to this PR.
Configuration menu - View commit details
-
Copy full SHA for e4db705 - Browse repository at this point
Copy the full SHA e4db705View commit details -
No need for the FileSignature cache to store multiple versions per-fi…
…le, once a file has changed, we can discard the old one.
Configuration menu - View commit details
-
Copy full SHA for e872905 - Browse repository at this point
Copy the full SHA e872905View commit details -
Add a descriptive error-message for the highly-unexpected case
where a FileSignature is generated for multiple files with the same filename.
Configuration menu - View commit details
-
Copy full SHA for aaddff8 - Browse repository at this point
Copy the full SHA aaddff8View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb724e9 - Browse repository at this point
Copy the full SHA cb724e9View commit details
Commits on Jun 28, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 5ca3b18 - Browse repository at this point
Copy the full SHA 5ca3b18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 267767a - Browse repository at this point
Copy the full SHA 267767aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 51647ab - Browse repository at this point
Copy the full SHA 51647abView commit details
Commits on Jun 29, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 5bf0896 - Browse repository at this point
Copy the full SHA 5bf0896View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2395492 - Browse repository at this point
Copy the full SHA 2395492View commit details