We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17b4f42 commit 6237692Copy full SHA for 6237692
src/textual/fuzzy.py
@@ -143,9 +143,10 @@ def score(search: _Search) -> float:
143
query_size = len(query)
144
find = candidate.find
145
# Limit the number of loops out of an abundance of caution.
146
- # This would be hard to reach without contrived data.
+ # This should be hard to reach without contrived data.
147
remaining_loops = 10_000
148
149
+ # TODO: Can this be optimized? The following can be slow for long candidates (can reach ~1ms).
150
while stack and (remaining_loops := remaining_loops - 1):
151
search = pop()
152
offset = find(query[search.query_offset], search.candidate_offset)
0 commit comments