Subject: bug#42190: 27.0.91; flex matching is slow

From: Ivan Yonchovski <[email-masked]>
Date: Sat, 04 Jul 2020 20:06:43 +0300

To reproduce the issue, install company-mode, go scratch buffer
execute the code:

(company-mode 1)
(setq completion-styles '(basic flex)
      company-idle-delay 0)

type

(rrrrrr) and then start deleting from the last r to the first one.

Observerd behaviour: the completion lags/feels slugish even in the
emacs -q setup(it gets slower if you load several packages).

The main offenders are:
completion-flex-all-completions + GC - on CPU profiler  
completion-pcm--hilit-commonality - on Memory profiler

Thanks,
Ivan