Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

Bump app v2.0.497

Louis Beaumont3686118b1447
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 2934e47ac..475f9821c 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "2.0.496"
+version = "2.0.497"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/crates/screenpipe-db/src/db.rs b/crates/screenpipe-db/src/db.rs
index 5dadcdb4f..7cb8aaf63 100644
--- a/crates/screenpipe-db/src/db.rs
+++ b/crates/screenpipe-db/src/db.rs
@@ -169,12 +169,11 @@ impl DatabaseManager {
let db_manager = DatabaseManager {
pool,
- // 2 permits = allow one writer to do pre-work (reads, prep) while
- // another holds the SQLite write lock. SQLite WAL only supports one
- // concurrent writer, but pipelining at the app level avoids idle gaps.
- // The FTS indexer uses micro-batches (25 rows) with yields between
- // each, so frame inserts can interleave without starvation.
- write_semaphore: Arc::new(Semaphore::new(2)),
+ // 1 permit = serialize writes at the app level. With 2 permits the
+ // second writer's BEGIN IMMEDIATE busy-waits 1-5s inside SQLite,
+ // wasting a connection. With 1 permit, writes queue in Rust (zero
+ // overhead) and BEGIN IMMEDIATE succeeds instantly.
+ write_semaphore: Arc::new(Semaphore::new(1)),
};
// Run migrations after establishing the connection
@@ -893,6 +892,11 @@ impl DatabaseManager {
windows: &[FrameWindowData],
ocr_engine: Arc<OcrEngine>,
) -> Result<Vec<(i64, usize)>, sqlx::Error> {
+ // Nothing to insert — skip acquiring the write lock entirely.
+ if windows.is_empty() {
+ return Ok(vec![]);
+ }
+
// Read the latest video_chunk OUTSIDE the write transaction.
// This SELECT only needs a shared read lock, not the exclusive write lock.
// Moving it out reduces write lock hold time significantly.