refactor(file_selector): optimize handling of selected files
Sorting function in FileSelector:get_filepaths() is not very efficient since it has to hit the filesystem each time it is called to determine if it is dealing with a directory or not. Optimize performance by figuring this data in get_project_filepaths() and returning a list of structures containing paths and directory flags, and use this data in get_filepaths(). Do the absolute->relative conversion once. Also use vim.fn.isdirectory() instead of vim.loop.fs_stat() everywhere in the file.
D
Dmitry Torokhov committed
5e50db3e0519cb11be2e90b0111684d6fb7f65f7
Parent: a5a2c22
Committed by yetone <yetoneful@gmail.com>
on 7/15/2025, 8:41:22 AM