Repository navigation
Conversation
54cd1ca to
b634b66
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Per-line timing runs even when debug logging is disabled, adding unnecessary hot-path overhead that can substantially reduce search throughput.
1 open issue
What changed in this PR
This PR reduces sleep-based polling in search worker management and adds per-line timing diagnostics.
Changes:
- Use event waits and blocking queue reads for progress logging and result collection.
- Simplify final result draining and target executor-owned workers during cleanup.
- Extract line-search logic and report average chunk maxima and maximum line-search duration.
| File | Description |
|---|---|
searchkit/task.py |
Extracts line-search logic and adds timing diagnostics. |
searchkit/search.py |
Replaces sleep-based polling and revises result draining and worker cleanup. |
Review effort: Balanced
b634b66 to
4d513a0
Compare
4d513a0 to
0835cfd
Compare
de25184 to
1658d0f
Compare
There was a problem hiding this comment.
🟡 Changes recommended
A critical cleanup gap lets FileSearchTimeout bypass forced worker termination, so ProcessPoolExecutor shutdown can still hang on stuck workers instead of propagating the timeout.
1 open issue
1 resolved since last review
Review effort: Balanced
1658d0f to
ad20a92
Compare
ad20a92 to
92eda11
Compare
92eda11 to
06153a8
Compare
6cabf14 to
6c19795
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The timing code uses an adjustable wall clock that can distort elapsed measurements, and its DEBUG-only aggregation lacks deterministic tests for timing output, search-result parity, and the 100,000-line chunk boundary.
2 open issues
1 resolved since last review
Review effort: Balanced
6c19795 to
c2f80cd
Compare
c2f80cd to
535980d
Compare
535980d to
4c2f538
Compare
4c2f538 to
fe2d126
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The failure tests do not cover a worker abruptly exiting while holding the store lock, leaving executor cleanup, thread shutdown, and subsequent search recovery unverified.
1 open issue
1 resolved since last review
Review effort: Balanced
b0e970f to
513e1b8
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Cleanup can SIGKILL unrelated multiprocessing children, including another search’s Manager, because it selects all children created after a snapshot rather than only this executor’s workers.
1 open issue
1 resolved since last review
Review effort: Balanced
Removes use of time.sleep() in threads and replaces with event.wait(). Also uses ProcessPoolExecutor to clean up processes on termination and adds timing information for searches to logs.
513e1b8 to
04670fa
Compare



No description provided.