danielfalk / smart-open.nvim

Neovim plugin for fast file-finding
MIT License
498 stars 25 forks source link

5 second pause before opening #60

Closed SamWindell closed 7 months ago

SamWindell commented 7 months ago

Hi, thanks for the great tool, I use it all the time. I'm having a problem where there's sometimes a ~5 second pause when trying to open the telescope buffer for smart-open.

It normally opens instantly. But then it will 'break' and go from then onward always have a 5 second delay before opening. So it's not like it's just randomly getting caught up whenever, it seems that's there's something very specific and permanent that must have changed to cause it to always have a delay.

My go-to solution is to delete the smart-open.sqlite3 file in case some bad data got written into it. But that doesn't seem to do it. My next thought, is could it be related to some bad data in my old-files list? Because when you delete smart-open.sqlite3 the next time it's launched the database is populated with data from the old files.

I've been using this plugin for about a year and I've come across this issue a few times. I've never worked out what's causing it or how I've fixed it. It's happened on both my Windows machine and my Linux machine.

Do you have any suggestions or ideas? Where can I start with debugging this?

SamWindell commented 7 months ago

EDIT: fixed it

Just in case anyone else has this issue I'll explain what I did and my best guess to the cause. I don't believe its smart-open's issue. I think its something going on with neovim. Its something to do with bad data being cached I think - perhaps caused by neovim not being shutdown properly. I fixed it by deleting more cache files: ~/.local/share/nvim/telescope_history ~/.local/share/nvim/smart_open.sqlite3 ~/.local/state/nvim/shada/main.shada