summaryrefslogtreecommitdiff
path: root/src/entry_backend
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-11-28 22:19:12 +0000
committerPhil Jones <philj56@gmail.com>2022-11-28 22:19:12 +0000
commit3861e8289ae40bac168275ce6f10b231e11baa55 (patch)
tree30093bb562e9718c60d3d36c9942ce4714c43488 /src/entry_backend
parent574b523ab5d9b63a114ac905e5ff8494f4b2f233 (diff)
Refactor string vector code.
Previously, string vectors were built by reading input line-by line, and multiple copies of string vectors were made when searching. Now, input is read into one big buffer, and string vectors only contain references to the strings in this buffer. This both speeds up reading of input, and avoids unnecessary copying of strings in various places. The main downside currently is that input read from stdin is no longer UTF-8 normalised. This means, for example, that a search for `e` won't necessarily match `é`. Normalisation is very slow relative to the rest of tofi, however, and not needed for most use-cases. This could either be solved by accepting the slowdown, or making this an option, such as --unicode or --unicode-normalize.
Diffstat (limited to 'src/entry_backend')
0 files changed, 0 insertions, 0 deletions