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

get-connection attempts class loading and driver manager invocation every time #19

Closed
seancorfield opened this issue May 8, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@seancorfield
Copy link
Owner

commented May 8, 2019

This is really only needed once per class name so it could be cached.

@seancorfield

This comment has been minimized.

Copy link
Owner Author

commented May 8, 2019

next.jdbc calls DriverManager/getLoginTimeout on every connection attempt -- that could be moved into get-datasource -- and it already mitigates the problem that clojure.java.jdbc has, because the class loading is done in get-datasource, not get-connection.

That said, it's probably still worth optimizing/caching for programs that create multiple data sources or are very naive about calling get-connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.