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

Save the result of Path.toUri() #9

Merged
merged 1 commit into from
Dec 23, 2021
Merged

Conversation

Postremus
Copy link
Member

@Postremus Postremus commented Dec 23, 2021

Converting a path multiple times to its URI representation is costly. This call can easily be cached for the sysfs path to the zip, since paths themselves are immutable.

Everytime the URI for a specific file inside a zip is created, .toURI of the original sysfs path is first called. These calls can be easily intercepted thanks to the delegates we have in place.

Saves about 250ms of dev mode startup time on quarkusio/quarkus#22336 (6d572df).
Saves about 5ms of dev mode startup time on main

Related to quarkusio/quarkus#21552

Converting a path multiple times to its URI representation is costly. This call can easily be cached for the sysfs path to the zip, since paths themselves are immutable.
@Postremus
Copy link
Member Author

/cc @aloubyansky Might be of interest to you.

Copy link
Member

@aloubyansky aloubyansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely, thanks @Postremus!

@aloubyansky aloubyansky merged commit bc0faf1 into quarkusio:main Dec 23, 2021
@Postremus Postremus deleted the cache-uri branch December 23, 2021 09:17
@aloubyansky
Copy link
Member

In the meantime, I've released 0.0.6 including this change.

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.

2 participants