Skip to content

Commit 6237692

Browse files
committed
comments
1 parent 17b4f42 commit 6237692

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/textual/fuzzy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,10 @@ def score(search: _Search) -> float:
143143
query_size = len(query)
144144
find = candidate.find
145145
# Limit the number of loops out of an abundance of caution.
146-
# This would be hard to reach without contrived data.
146+
# This should be hard to reach without contrived data.
147147
remaining_loops = 10_000
148148

149+
# TODO: Can this be optimized? The following can be slow for long candidates (can reach ~1ms).
149150
while stack and (remaining_loops := remaining_loops - 1):
150151
search = pop()
151152
offset = find(query[search.query_offset], search.candidate_offset)

0 commit comments

Comments
 (0)