Skip to content

KFuzzyMatcher update

Waqar Ahmed requested to merge work/waqar/fuzzy-3 into master

This update includes some changes that we have been using in Kate for a couple of months now. These include:

  • Do simple matching before running the actual algorithm. This increases performance a lot if you are matching with a lot of strings. It can also result in worse performance in some cases if for example more than half of the strings end up being matched because now you are doing "two" matches per string but in practice this will rarely happen
  • Score for "sequential matches" is decreased a little bit and is now the same as that of CamelCase / snake / separator matches. There is no concrete data that this is better, but after 2 months of usage and testing with various data sets, code files / normal user strings / dictionaries, this gives the best results overall. The problem with previous scoring was that it would work, but in cases where you have CamelCase files or snake_case files, Sequential results would be scored higher and hence end up at the top.
  • Minor doc cleanup

Signed-off-by: Waqar Ahmed waqar.17a@gmail.com

Merge request reports