sqlite-jdbc icon indicating copy to clipboard operation
sqlite-jdbc copied to clipboard

Extract DB files to a subdirectory within temporary folder

Open belugabehr opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

The library performs a cleanup routine of the /tmp directory at the start of every execution.

https://github.com/xerial/sqlite-jdbc/blob/61fda53dd39bc31dbf46f5f4523d85334f6c0fb9/src/main/java/org/sqlite/SQLiteJDBCLoader.java#L90C48-L90C58

This means that the duration of time to perform this action depends on the number of files in the /tmp directory at the time of startup.

Describe the solution you'd like This can be mostly mitigated by first creating a sub-directory in the /tmp directory (e.g., "xerial-sqlite-jdbc") and only store JDBC native libs in this directory. The size of this directory will be much less at risk of having large numbers of files present.

belugabehr avatar Aug 07 '24 21:08 belugabehr

~~PR welcome~~

gotson avatar Aug 12 '24 10:08 gotson

I thought about that, and we already have org.sqlite.tmpdir, so this seems redundant. What do you think?

gotson avatar Aug 26 '24 01:08 gotson