Decision: draft debounce interval #4

Closed
opened 2026-07-23 14:46:22 +02:00 by cloudbot · 1 comment
Collaborator

Decision #4 — pick the draft-autosave debounce interval and the background-sync frequency cap.

While a user edits an entry, changes are batched and pushed to Outline on an idle debounce (a single editMode: replace per tick). The prototype surfaces this to the user only as "Draft autosaves every few seconds"; it doesn't commit to a number.

The trade-off

  • Shorter interval (e.g. 2s) → less data lost if the app dies mid-edit, but more Outline API traffic and more revision-check churn during active typing.
  • Longer interval (e.g. 5–8s) → fewer API calls, but a larger window of unsaved work.

Two values to set:

  1. Idle debounce — how long after the last keystroke before a tick fires (proposed 3–5s idle).
  2. Background-sync frequency cap — a floor on how often ticks may actually hit the API, so fast typing can't hammer Outline.

What to decide

The concrete debounce value (or a small range) and the minimum inter-sync gap for the cap.

Blocks: the sync engine's debounce/WorkManager scheduling.

Recommendation: 4s idle debounce with a hard cap of one sync per 4s while a sheet is open. It sits in the middle of the proposed range, keeps "autosaves every few seconds" honest, and the cap prevents runaway calls. Publish always forces an immediate final tick regardless of the cap.

Source: Solution Design — Family App v1 §7 (doc vpBNbG4TsV), decision §13 #4.

**Decision #4 — pick the draft-autosave debounce interval and the background-sync frequency cap.** While a user edits an entry, changes are batched and pushed to Outline on an idle debounce (a single `editMode: replace` per tick). The prototype surfaces this to the user only as "Draft autosaves every few seconds"; it doesn't commit to a number. ### The trade-off - **Shorter interval** (e.g. 2s) → less data lost if the app dies mid-edit, but more Outline API traffic and more revision-check churn during active typing. - **Longer interval** (e.g. 5–8s) → fewer API calls, but a larger window of unsaved work. Two values to set: 1. **Idle debounce** — how long after the last keystroke before a tick fires (proposed **3–5s idle**). 2. **Background-sync frequency cap** — a floor on how often ticks may actually hit the API, so fast typing can't hammer Outline. ### What to decide The concrete debounce value (or a small range) and the minimum inter-sync gap for the cap. **Blocks:** the sync engine's debounce/WorkManager scheduling. **Recommendation:** **4s idle debounce with a hard cap of one sync per 4s** while a sheet is open. It sits in the middle of the proposed range, keeps "autosaves every few seconds" honest, and the cap prevents runaway calls. Publish always forces an immediate final tick regardless of the cap. **Source:** Solution Design — Family App v1 §7 ([doc vpBNbG4TsV](https://outline.marquezkeenan.family/doc/solution-design-family-app-v1-vpBNbG4TsV)), decision §13 #4.
Owner

Accept recommendation. The Outline instance is on a mid-tier VPS, with not a lot of traffic.

Accept recommendation. The Outline instance is on a mid-tier VPS, with not a lot of traffic.
ben closed this issue 2026-07-23 17:45:06 +02:00
Sign in to join this conversation.
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
utilities/Logbook#4
No description provided.