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

Enabling SQLITE_CONFIG_MEMSTATUS is a disaster #953

Closed
mhanna opened this issue Aug 28, 2023 · 3 comments
Closed

Enabling SQLITE_CONFIG_MEMSTATUS is a disaster #953

mhanna opened this issue Aug 28, 2023 · 3 comments
Labels

Comments

@mhanna
Copy link

mhanna commented Aug 28, 2023

Describe the bug
When enabling the parameter SQLITE_CONFIG_MEMSTATUS at compile time, the performance (read/write) is more than 2x slower

To Reproduce
compile with -DSQLITE_CONFIG_MEMSTATUS=1

Expected behavior
I would like to have a way to disable this parameter at runtime as the native code already support it by sqlite3_config(SQLITE_CONFIG_MEMSTATUS,0)

Logs
If applicable, provide logs.

Environment (please complete the following information):

  • OS: centos
  • CPU architecture: x86_64
  • sqlite-jdbc version 3.42

Additional context
Add any other context about the problem here.

@mhanna mhanna added the triage label Aug 28, 2023
@gotson
Copy link
Collaborator

gotson commented Aug 28, 2023

When enabling the parameter SQLITE_CONFIG_MEMSTATUS at compile time, the performance (read/write) is more than 2x slower

how does that have anything to do with the JDBC driver ? This is a SQLite option.

I would like to have a way to disable this parameter at runtime as the native code already support it by sqlite3_config(SQLITE_CONFIG_MEMSTATUS,0)

open a feature request in that case, not a bug

@gotson gotson closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2023
@mhanna
Copy link
Author

mhanna commented Aug 28, 2023

@gotson
A feature request opened

However, I think something needs to be addressed here
I just got a reply from the sqlite support, i quote them

**Is your app calling sqlite3_soft_heap_limit64(), sqlite3_hard_heap_limit64(), or sqlite3_soft_heap_limit? Or is it compiled with the SQLITE_MAX_MEMORY option set to some value?

These interfaces are used to specify a global limit to the amount of memory used by the library, but they only work if memstats are enabled. If one of these limits was enabled by SQLITE_DEFAULT_MEMSTATUS=1 it might slow the application down to the extent you're seeing.**

@gotson
Copy link
Collaborator

gotson commented Aug 28, 2023

I just got a reply from the sqlite support

You should probably have started by adding this to the issue.

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

No branches or pull requests

2 participants