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

[IO performance] setDefaultUseCaches(false) impacts all URL connections #656

Closed
gwenn opened this issue Sep 1, 2021 · 5 comments · Fixed by #755
Closed

[IO performance] setDefaultUseCaches(false) impacts all URL connections #656

gwenn opened this issue Sep 1, 2021 · 5 comments · Fixed by #755

Comments

@gwenn
Copy link

gwenn commented Sep 1, 2021

Using setDefaultUseCaches(false) impacts all URL connections.
Because defaultUseCaches is static (see setDefaultUseCaches implementation).
Maybe you should use setUseCaches instead.

For example, after setDefaultUseCaches(false), each time a new class is loaded from a signed JAR, initializeVerifier is recomputed.

Regards.

@gotson
Copy link
Collaborator

gotson commented Sep 1, 2021

FYI this was done as part of #578 IIRC

@AuroraLS3
Copy link
Contributor

setDefaultUseCaches(false) causes class loading to fail & crash in some Minecraft server implementations since many use URLClassLoader for loading plugins/mods

@gotson
Copy link
Collaborator

gotson commented Jul 29, 2022

Anyone willing to submit a PR for this?

@AuroraLS3
Copy link
Contributor

Opened a PR.

@gotson gotson linked a pull request Jul 29, 2022 that will close this issue
gotson pushed a commit that referenced this issue Jul 29, 2022
Use of setDefaultUseCaches impacts all URLClassLoaders and HttpURLConnections, which can lead to erratic behavior of non-sqlite components running on a system since the variable is static.

Closes: #656
@gotson
Copy link
Collaborator

gotson commented Aug 1, 2022

This is available in the latest snapshot, please give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants