Skip to content

perf(view): filter each source once in view.open - #2242

Merged
hrsh7th merged 1 commit into
hrsh7th:mainfrom
hood:perf/view-single-filter
Nov 5, 2026
Merged

hrsh7th merged 1 commit into
hrsh7th:mainfrom
hood:perf/view-single-filter

Conversation

@hood

@hood hood commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Closes #2236

Summary

view.open now runs get_entries once per source and reuses the result, instead of filtering once for the symbol-trigger check and again to collect entries.

Data

view.open over 10 keystrokes. CPU time, best of 20. Benchmark in #2236.

Scenario Before After
6k items, isIncomplete 36.5 ms 26.1 ms (-29%)
20k items, isIncomplete 185.0 ms 93.7 ms (-49%)

Behaviour

No change. Scores were already reset by each get_entries call, and the source priority is still added once per entry.

Testing

All 73 specs pass, luacheck reports 0 warnings, and touched files are formatted with stylua.

@hrsh7th

hrsh7th commented Nov 5, 2026

Copy link
Copy Markdown
Owner

thank you.

@hrsh7th
hrsh7th merged commit e04302f into hrsh7th:main Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: view.open filters every source twice per keystroke

2 participants