Skip to content

Async vision: decouple run_vision from save path #19

Description

@geirolafs

Task

Per #8 decision. Part of map #1.

run_vision is called synchronously inside process_and_save (lib.rs) — every save (drag-drop, paste, extension, clipboard watch) blocks ~5.9 s on the keep-vision spawn (#7: spawn is 40× the rest of the 148 ms pipeline). Bulk import at 20k extrapolates to 34 h.

Fix

  • Remove run_vision from the save pipeline — save returns ~150 ms; card appears instantly with palette + thumbhash
  • Backfill vision_tags + ocr_text async afterward via the existing analyze_vision_item path
  • Emit/refresh so tags appear in UI when backfill lands

Deferred (not this ticket)

Persistent keep-vision sidecar / batch mode to amortize per-spawn model load — only if backfill throughput (~0.17 img/s) actually hurts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:taskEnabling work before a decision

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions