Skip to content

Fix #32: Persistent SQLite connections#186

Open
bscholer wants to merge 2 commits into
mainfrom
fix/issue-32-persistent-connections
Open

Fix #32: Persistent SQLite connections#186
bscholer wants to merge 2 commits into
mainfrom
fix/issue-32-persistent-connections

Conversation

@bscholer

Copy link
Copy Markdown
Owner

Fixes #32

This adds persistent SQLite connections to JobManager and ProjectManager,
savoiding the overhead of creating a fresh connection and running migrations
for every job/project persistence operation.

Changes

  • Added attribute to JobManager and ProjectManager
  • Added to initialize connection once
  • Added helper for both managers
  • Updated all DB access methods to reuse the persistent connection
  • Runs migrations once at startup instead of on every connect()
  • Added bench_persistence.py benchmark showing 100x+ speedup for
    scenarios with many job events (e.g. Siril's seq_register)

bscholer added 2 commits May 27, 2026 09:30
- Add _persistence_conn attribute to JobManager and ProjectManager
- Add _init_persistence_db() to initialize connection once
- Add _get_persistence_connection() helper for both managers
- Update all DB access methods to reuse the persistent connection
- Run migrations once at startup instead of on every connect()
- Add bench_persistence.py benchmark showing 100x+ speedup for
  scenarios with many job events (e.g. Siril's seq_register)
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.

Job/project persistence opens a fresh SQLite connection per write

1 participant