qutebrowser/tests/unit/completion
Florian Bruhin ee9aecda46 listcategory: Fix O(n^2) performance if no match
With the change in #7955, if the regex did not match, it ended up retrying the
lookahead at every position of the string (expected), but then *also* repeated
that process for every position in the string. Thus, a non-matching pattern
ended up in O(n^2) performance (with n = length of URL).

Instead, anchor the pattern at the beginning of the string. This doesn't change
behaviour as we use .* at the beginning of every lookahead anyways, but it means
we end up with O(n) instead of O(n^2) performance.

Co-authored-by: toofar <toofar@spalge.com>
2024-01-12 18:53:22 +01:00
..
test_completer.py reuse: Update remaining copyright texts 2023-07-23 12:52:01 +02:00
test_completiondelegate.py reuse: Update remaining copyright texts 2023-07-23 12:52:01 +02:00
test_completionmodel.py reuse: Update remaining copyright texts 2023-07-23 12:52:01 +02:00
test_completionwidget.py reuse: Update remaining copyright texts 2023-07-23 12:52:01 +02:00
test_histcategory.py reuse: Update remaining copyright texts 2023-07-23 12:52:01 +02:00
test_listcategory.py Reapply "Merge pull request #7955 from arza-zara/search_any_order" 2024-01-12 18:53:22 +01:00
test_models.py listcategory: Fix O(n^2) performance if no match 2024-01-12 18:53:22 +01:00