PythonNut / company-flx

:city_sunset: Flx fuzzy matching for company
GNU General Public License v3.0
85 stars 6 forks source link

Hanging 2s when I input one character #22

Closed bruce-bai22 closed 1 week ago

bruce-bai22 commented 7 years ago

Hi, When I enable company-flx after company is activate, company candidates process so slow. I also set the company-flx-limit to 20, but nothing getting better. So I doubt if I miss some config for company-flx? My config is like this:

(with-eval-after-load 'company
  (setq company-flx-limit 20)
  (company-flx-mode 1))
I find that the more characters I input, the faster company processing. There's another suggestion : give another variable to config when actually enable fuzzy company after how many characters have been inputted.
Alexander-Shukaev commented 5 years ago
(setq-default company-flx-limit 256)

Hangs forever for me, lol:

- timer-event-handler                                           22149  80%
 - apply                                                        22149  80%
  - company-idle-begin                                          21658  78%
   - company-auto-begin                                         21658  78%
    - company--perform                                          21658  78%
     - company--begin-new                                       21658  78%
      - company-calculate-candidates                            21655  78%
       - company--fetch-candidates                              21655  78%
        - company-call-backend-raw                              21655  78%
         - apply                                                21655  78%
          - company-capf                                        21655  78%
           - apply                                              21655  78%
            - company-flx-company-capf-advice                   21655  78%
             - apply                                            21655  78%
              - #<compiled 0xe0cce9>                            21655  78%
               - completion-all-completions                     21655  78%
                - completion--nth-completion                    21655  78%
                 - completion--some                             21655  78%
                  - #<compiled 0x5127ef59>                      21655  78%
                   - company-flx-all-completions                21655  78%
                    - company-flx-completion                    21655  78%
                     - all-completions                            336   1%
                      - #<compiled 0x51291639>                    333   1%
                       - mapcar                                   333   1%
                        - #<compiled 0x5125cf59>                  333   1%
                         - all-completions                        333   1%
                          - #<compiled 0x51292af5>                330   1%
                           - apply                                330   1%
                            - completion-table-with-predicate                330   1%
                               complete-with-action                330   1%
                            #<compiled 0x4813dd>                    3   0%

Disabling the mode until this is fixed.

PythonNut commented 5 years ago

Try (setq company-minimum-prefix-length 2).