You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make /v1/sync-local-files asynchronous to remove offline sync bottleneck #3893
The POST /v1/sync-local-files endpoint is currently fully synchronous and blocks until the entire backend pipeline completes (decode, VAD, transcription, merge, save).
This creates a major bottleneck for users who rely on offline sync.
When users have large offline backlogs (hundreds of files or a full day of data), sync time scales with transcription latency and can take hours, even though uploads themselves are fast.
This is causing poor UX and does not scale.
⸻
Current Behavior (Problem)
• Phone app uploads .bin files
• Backend processes synchronously:
• decode
• VAD
• Deepgram transcription
• merge
• DB save
• HTTP 200 is returned only after all processing completes
• Phone app cannot delete local files or upload the next batch until the response returns
Result:
• Each batch blocks for ~45–50 seconds
• Large offline backlogs take an unacceptably long time to clear
⸻
Proposed Change (Fix)
Change /v1/sync-local-files to be asynchronous:
• Persist uploaded files immediately
• Return HTTP 200 as soon as persistence succeeds
• Move decode, VAD, transcription, merge, and save to background processing
• Allow the phone app to immediately:
• delete local .bin files
• upload the next batch
This decouples upload throughput from transcription latency.
⸻
Benefits
• Offline sync time scales with network upload speed, not transcription latency
• Large backlogs clear quickly
• Better user experience for offline-first users
• Backend retains full control over processing concurrency and retries
⸻
Acceptance Criteria
• /v1/sync-local-files returns HTTP 200 after successful upload persistence
• Backend processing runs asynchronously
• No regression in data integrity or durability
• Idempotency and retry safety preserved
⸻
Priority
High
Many users depend on offline sync, and the current synchronous design is a scalability blocker.
@smian1 Well-documented performance improvement request. Making /v1/sync-local-files async would decouple upload throughput from transcription latency - significant improvement for users with large offline backlogs. I scored it as Layer capture / P2 / maintainer with score 21 (w=5, sev 3, trust 3, freq 3, lev 3, cost 3). See our triage guide.
Activity
beastoin commentedon Jan 29, 2026
@smian1 Well-documented performance improvement request. Making /v1/sync-local-files async would decouple upload throughput from transcription latency - significant improvement for users with large offline backlogs. I scored it as Layer capture / P2 / maintainer with score 21 (w=5, sev 3, trust 3, freq 3, lev 3, cost 3). See our triage guide.
by AI for @beastoin
undivisible commentedon Jul 20, 2026
Async sync — confirmed: POST /v2/sync-local-files endpoint exists and is async.