Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize search for text that is not case sensitive #249

Closed
zufuliu opened this issue Oct 22, 2020 · 1 comment
Closed

Optimize search for text that is not case sensitive #249

zufuliu opened this issue Oct 22, 2020 · 1 comment

Comments

@zufuliu
Copy link
Owner

zufuliu commented Oct 22, 2020

Currently, case insensitive search is very slow, besides the brute force algorithm, it will do case folding for the searched text and characters from current document each time a comparison is needed.

Commit 334befc and d308d41 replaced brute force algorithm for case sensitive search with the Boyer-Moore-Horspool-Sunday algorithm, which is very faster in general.
Commit 3455e3b added case sensitivity detection for ASCII text, which makes mark occurrences runs faster, see #236.

As of Unicode 13.0.0, there are only 2847 characters (code points) which has case sensitivity, characters in most other languages (scripts) other than Latin, Greek, Coptic, Cyrillic, Armenian, Georgian, Cherokee are not case sensitive, the "Match case" option make no sense for these characters, enable automatic case sensitive search will benefits people handing such text, especially mark occurrences in large document.

@zufuliu zufuliu added this to the v4.20.11 milestone Oct 22, 2020
zufuliu added a commit that referenced this issue Oct 31, 2020
@zufuliu
Copy link
Owner Author

zufuliu commented Oct 31, 2020

Implemented by 0c5d082 and 5b89ad2.

@zufuliu zufuliu closed this as completed Oct 31, 2020
RaiKoHoff pushed a commit to RaiKoHoff/notepad2 that referenced this issue Jul 19, 2021
RaiKoHoff pushed a commit to RaiKoHoff/notepad2 that referenced this issue Jul 19, 2021
RaiKoHoff pushed a commit to RaiKoHoff/notepad2 that referenced this issue Jul 19, 2021
RaiKoHoff pushed a commit to RaiKoHoff/notepad2 that referenced this issue Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant