rofi/source/dialogs
Tom Hinton af6a4b83eb Make normal filtering of plain ASCII lines faster
This patch adds a field lines_not_ascii to the MenuState structure. The
nth entry is 0 unless the nth member of MenuState.lines has a non-ascii
codepoint in it.

All comparison functions (menu_match_cb type) take an additional
argument to tell them if the thing they are matching is not_ascii. They
can use this to determine whether to collate and case-fold the
input (for non-ascii strings), or whether to use strstr/strcasestr (for
ascii strings).

The change is not currently implemented for flex matching, due to my
laziness. However, it should be a simple enough matter to add.

For my large input of 400,000 lines, this reduces typical filtering time
to about ten microseconds from about 2 seconds.
2015-10-01 12:16:41 +01:00
..
combi.c Make normal filtering of plain ASCII lines faster 2015-10-01 12:16:41 +01:00
dmenu.c Make normal filtering of plain ASCII lines faster 2015-10-01 12:16:41 +01:00
run.c Only cache successful run. (Thanks to Koppa nd daemoni) 2015-09-29 17:28:21 +02:00
script.c More line fixing. 2015-09-19 21:00:06 +02:00
ssh.c Fix small leak 2015-09-26 21:06:36 +02:00
window.c Make normal filtering of plain ASCII lines faster 2015-10-01 12:16:41 +01:00