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

feat: introduce FileSystem.unjarOnce #1249

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NTPape
Copy link
Contributor

@NTPape NTPape commented Jun 9, 2024

specs2-html currently copies all of its html resources (41 files) for each specification (executed with html output), reading and traversing the specs2-html.jar four times in the process, overwriting its own previously copied files over and over. This is inefficient and causes unnecessary strain on the disk usage. The newly introduced unjarOnce method is used by specs2-html to only unjar its resources once for each target location and filter criteria.

I went with a simple LRU cache as to not risk OOM, but I'm open to suggestions.

(I would also backport this to v4 if / once this is merged.)

`specs2-html` currently copies all of its html resources (41 files) for each specification (executed with html output), reading and traversing the `specs2-html.jar` four times in the process, overwriting its own previously copied files over and over. This is inefficient and causes unnecessary strain on the disk usage. The newly introduced `unjarOnce` method is used by `specs2-html` to only unjar its resources once for each target location and filter criteria.
@NTPape NTPape force-pushed the specs2v5-unnecessary-unjar branch from 3da7b60 to fb8ad68 Compare June 9, 2024 22:01
@NTPape NTPape changed the title feat: introduce FileSystem.unjar once parameter feat: introduce FileSystem.unjarOnce Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant