[PR #496] [MERGED] Improve SQLite response persistence performance #3345

Closed
opened 2026-07-15 02:02:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/496
Author: @gschier
Created: 7/3/2026
Status: Merged
Merged: 7/3/2026
Merged by: @gschier

Base: mainHead: fix/sqlite-wal-response-perf


📝 Commits (2)

  • ddfa322 Improve SQLite response persistence performance
  • 84401df Merge branch 'main' into fix/sqlite-wal-response-perf

📊 Changes

2 files changed (+28 additions, -15 deletions)

View changed files

📝 crates/yaak-models/src/lib.rs (+18 -5)
📝 crates/yaak/src/send.rs (+10 -10)

📄 Description

This enables WAL-backed SQLite connections and reduces unnecessary response body write work in the request send path. The change targets reported cases where response timing and persistence slowed dramatically on some disks, without changing timeline event persistence semantics or request body blob storage behavior.

  • Initialize file-backed app and blob SQLite pools with journal_mode=WAL, synchronous=NORMAL, and a 5s busy timeout.
  • Use rusqlite helpers for PRAGMA updates and the busy timeout handler instead of raw SQL batches.
  • Read response bodies through a fixed buffer and flush the response body file once after streaming completes.
  • Leave event persistence and request body chunk persistence behavior unchanged for a minimal, low-risk fix.

Feedback:
https://yaak.app/feedback/posts/requests-getting-slower-in-newer-versions
https://yaak.app/feedback/posts/enabling-sqlite-wal-mode-for-improved-performance-on-slow-ssd
https://yaak.app/feedback/posts/very-slow-perfomance-after-last-update
https://yaak.app/feedback/posts/extremely-slow-response-times-with-certain-servers


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/496 **Author:** [@gschier](https://github.com/gschier) **Created:** 7/3/2026 **Status:** ✅ Merged **Merged:** 7/3/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `fix/sqlite-wal-response-perf` --- ### 📝 Commits (2) - [`ddfa322`](https://github.com/mountain-loop/yaak/commit/ddfa32262f88c30ac5adda610d5999395125ced2) Improve SQLite response persistence performance - [`84401df`](https://github.com/mountain-loop/yaak/commit/84401df27b0a3427cfc342c0fbe9b3fa0c762fd3) Merge branch 'main' into fix/sqlite-wal-response-perf ### 📊 Changes **2 files changed** (+28 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `crates/yaak-models/src/lib.rs` (+18 -5) 📝 `crates/yaak/src/send.rs` (+10 -10) </details> ### 📄 Description This enables WAL-backed SQLite connections and reduces unnecessary response body write work in the request send path. The change targets reported cases where response timing and persistence slowed dramatically on some disks, without changing timeline event persistence semantics or request body blob storage behavior. - Initialize file-backed app and blob SQLite pools with `journal_mode=WAL`, `synchronous=NORMAL`, and a 5s busy timeout. - Use `rusqlite` helpers for PRAGMA updates and the busy timeout handler instead of raw SQL batches. - Read response bodies through a fixed buffer and flush the response body file once after streaming completes. - Leave event persistence and request body chunk persistence behavior unchanged for a minimal, low-risk fix. Feedback: https://yaak.app/feedback/posts/requests-getting-slower-in-newer-versions https://yaak.app/feedback/posts/enabling-sqlite-wal-mode-for-improved-performance-on-slow-ssd https://yaak.app/feedback/posts/very-slow-perfomance-after-last-update https://yaak.app/feedback/posts/extremely-slow-response-times-with-certain-servers --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-15 02:02:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#3345