Replace the per-render readdirSync().filter().map(statSync).sort() chain with a single-pass max-by-mtime loop. Drops the O(n log n) sort and the throwaway intermediate array; I/O and resolved-file behavior are identical. Adds the first behavior-lock test for the todo-resolution path. The larger disk-backed cache win from the issue is deferred: statusline is a fresh child process per render, so any cache must be disk-backed with invalidation/atomic-write design that needs maintainer input. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
5
.changeset/swift-otter-hum.md
Normal file
5
.changeset/swift-otter-hum.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
type: Fixed
|
||||
pr: 305
|
||||
---
|
||||
Use a single-pass max-by-mtime scan for statusline todo lookup, dropping the per-render O(n log n) sort (#305).
|
||||
Reference in New Issue
Block a user