vim-ledger icon indicating copy to clipboard operation
vim-ledger copied to clipboard

First completion very slow

Open alerque opened this issue 4 years ago • 2 comments

When first opening a ledger file the first time a completion is run (usually the date field for me) it takes a long time to return the result. After that results are fine. If this is a function of caching the list, then we should background a job that is getting those ready when a file is opened, not waiting until the first request is made.

Neovim + external command for both account and payee completion

alerque avatar Nov 04 '19 12:11 alerque

With both nvim 0.5.0 and vim 8.2-2925, on a .ledger file with more than a few lines the first completion runs forever. I tried letting it run, and CPU was still at 100% after 24 hours.

Currently I find vim-ledger to be unusable because of this.

Example file where I experience this bug:

2021-01-01 open a:abc:def 
2021-01-01 open a:abc:ghi

Now start writing:

2021, vim-ledger hangs after typing "20".

bcashlol avatar Jun 19 '21 03:06 bcashlol

Thanks for the small example. Unfortunately it doesn't reproduce for me, so that complicates things. I suspect some option I'm using in my init file is bypassing whatever your problem is. Can you include any config related to this plugin from your rc files?

alerque avatar Jun 19 '21 08:06 alerque