mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
![]() ## Description I have 5000 oldfiles, every time i go to a new directory and open nvim, the dashboard recent_files (with `cwd=true`) computation takes 4-5 seconds to go through all oldfiles before deciding nothing should show up ```lua sections = { { icon = " ", title = "Recent files (current directory)", section = "recent_files", cwd = true }, } ``` It appears to be the `vim.v.oldfiles[i]` indexing. I didn't look much into it but it opens much faster looping with ipairs. Repro: 1. add the above section config in dashboard 2. increase oldfiles limit and populate up to the limit 3. `mkdir brand-new-directory; cd brand-new-directory; nvim` 4. the section is empty as expected, but it takes a few seconds before dashboard shows up ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots <!-- Add screenshots of the changes if applicable. --> |
||
---|---|---|
.. | ||
snacks | ||
trouble/sources |