Skip to content

Reduce SQLite table probes during store open - #93

Closed
forest-savage1234 wants to merge 1 commit into
log2timeline:mainfrom
forest-savage1234:perf/sqlite-open-probes-4
Closed

forest-savage1234 wants to merge 1 commit into
log2timeline:mainfrom
forest-savage1234:perf/sqlite-open-probes-4

Conversation

@forest-savage1234

Copy link
Copy Markdown

Summary

  • Read the SQLite table-name set once per Open() and query row counts only for container tables that exist.
  • Keep the next sequence number at zero for absent container types, preserving current read and write behavior.
  • Add a regression that asserts row-count queries are issued only for present tables.

Closes #4

Validation

  • tests.sqlite_store — 21 passed.
  • git diff --check.
  • The issue's controlled benchmark reports 89.75% fewer schema/probe queries and a 55.8–57.0% reduction in time spent in Open() for two images.

Scope notes

The patch intentionally leaves the existing _HasTable call inside row counting for present tables; removing that is separate scope.

@joachimmetz

Copy link
Copy Markdown
Member

@forest-savage1234 thanks for the proposed changes, what is the status of this PR? Still draft?

@joachimmetz

Copy link
Copy Markdown
Member

No response from original reporter, considering this PR still being worked on. Closing

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.

Tune performance of SQLite back-end

2 participants