Cold semantic index build delays first Find Anything query by 47–52 seconds
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- machine-learning, numpy, python
- Domain
- machine-learning, performance, search
Research direction
Start with the Find Anything semantic-index build and the embeddings.lazy_text_model configuration, then trace the NPZ cache and startup-warmup paths. Reproduce the first-query delay on the described CPU-only CLIP setup and compare it with subsequent queries and warmup behavior. Done means the cold-start path no longer makes the initial request wait for the full index build, with timings documenting the improvement.
Written by the indexing model from the issue text.
Description
Environment
Environment: Keystone v0.1.5, native Debian 13 installations, UNVR with Protect 7.4.114. Tested on a multilingual-search fork at 0daad0cba2e86db6041fc44df09bd562524e4276, based on upstream 48d1168b07867032c4ba684c56f02d048ec8a9ea. Not yet reproduced on an unmodified current upstream checkout.
CPU-only CLIP ViT-L/14 FP32, two inference threads, default lazy text model loading.
Observed
First search on i5-1220P took approximately 47 seconds; subsequent searches took approximately 30–170 ms. On i5-4250U:
Building CLIP semantic index for 5375 Protect RAM tags (one-time cache)...
Loaded CLIP text encoder text_model.onnx in 1.41s (provider=CPUExecutionProvider, load #1)
Semantic Find Anything index ready: 5375 RAM tags (built & cached in 52.24s)
Find Anything NL_PARSE query='red jacket' -> visual='red jacket' objectTypes=['person'] keyTags=1 semantic=True (52365ms)
Expected
The initial query should ideally avoid waiting for the entire cold index build, particularly if it risks exceeding Protect's request deadline (not measured).
Notes
The upstream code already supports a persistent NPZ cache and startup warmup via embeddings.lazy_text_model: false. These mitigations have not yet been tested across restarts in this setup. Reporting the observed cold-start cost as a performance improvement opportunity, not requesting a specific implementation.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 114
- Avg merge
- 1h
- Merged PRs (30d)
- 115
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from seeARMS/keystone
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
All issues in seeARMS/keystone
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day