lite icon indicating copy to clipboard operation
lite copied to clipboard

Disable indexing of certain directories

Open takase1121 opened this issue 3 years ago • 2 comments

This will be really useful for large projects that has the dependencies in the same folder, like Node.js' node_modules folder. Instead, they can be indexed only when necessary (when clicked on them).

takase1121 avatar Sep 27 '20 03:09 takase1121

You can set exclude patterns in the config.ignore_files to make the project scan logic completely skip those files/directories. However, this is not dynamic and making it so might imply some fairly sized modifications. If I'm not mistaken, the scan thread continuously scans the current directory for changes, so it could be a matter of having some sort of command to modify the config on the fly, but that would be limiting. The issue here tho, is that the treeview plugin uses the core.project_files field which comes from the scan thread, meaning that if you set the config to ignore a certain pattern of file/directory, then it won't even show up in the treeview in the first place, so the whole clicking thing wouldn't work.

I suppose the best choice would be to set a limit on how deep to scan the project tree, and maybe also add some sort of lazy_directories field that makes the scanning logic acknowledge a directory, but not its contents, unless you specifically ask for them.

Tmpod avatar Oct 12 '20 13:10 Tmpod

suppose the best choice would be to set a limit on how deep to scan the project tree

Yes, I have projects that make lite use gigabytes of memory. A depth limit approach would already help a lot.

SwissalpS avatar Oct 22 '20 00:10 SwissalpS