[PR #508] [MERGED] Batch streamed request body history into full-size chunks #3357

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

📋 Pull Request Information

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

Base: mainHead: batch-request-body-chunks


📝 Commits (1)

  • 897d419 Batch streamed request body history into full-size chunks

📊 Changes

1 file changed (+14 additions, -4 deletions)

View changed files

📝 crates/yaak/src/send.rs (+14 -4)

📄 Description

Follow-up to #498. Streamed request bodies were persisted one row per network read (~8-16 KiB), so a large upload produced thousands of tiny SQLite inserts — the reason body-history capture lagged seconds behind the response.

persist_request_body_stream now accumulates reads into the same 1 MB REQUEST_BODY_CHUNK_SIZE chunks the in-memory body path uses, flushing the remainder when the stream ends. An 88 MB upload drops from ~10k inserts to ~89.

Connection checkout stays per-insert (rather than held for the stream's lifetime) so long uploads can't starve the blob pool.


🔄 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/508 **Author:** [@gschier](https://github.com/gschier) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `batch-request-body-chunks` --- ### 📝 Commits (1) - [`897d419`](https://github.com/mountain-loop/yaak/commit/897d419e704d79a6a6265997c33780ff2f1cbd55) Batch streamed request body history into full-size chunks ### 📊 Changes **1 file changed** (+14 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/yaak/src/send.rs` (+14 -4) </details> ### 📄 Description Follow-up to #498. Streamed request bodies were persisted one row per network read (~8-16 KiB), so a large upload produced thousands of tiny SQLite inserts — the reason body-history capture lagged seconds behind the response. `persist_request_body_stream` now accumulates reads into the same 1 MB `REQUEST_BODY_CHUNK_SIZE` chunks the in-memory body path uses, flushing the remainder when the stream ends. An 88 MB upload drops from ~10k inserts to ~89. Connection checkout stays per-insert (rather than held for the stream's lifetime) so long uploads can't starve the blob pool. --- <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:03:15 -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#3357