file-tree-alternative icon indicating copy to clipboard operation
file-tree-alternative copied to clipboard

[Feature request] Only load a specified number of files

Open sjhsbhqf opened this issue 8 months ago • 0 comments

When I click on a directory that includes many subfolders or files, the file list below will cause the entire Obsidian to lag because it is loading such a large number.

I'm wondering if we could add a preloading feature, or more precisely, load only 100 items.

I don't quite understand where performance issues are more likely to occur, but I might know:

  • During indexing, stop indexing after 100 items completed, which should be the lowest performance requirement? In this case, the order is probably just the order in which system resources are listed when accessed, either by storage order or some other order, which is likely not modifiable by default?

  • Index everything, and then display only 100 items, which is a higher performance requirement, as only the displayed portion is released. In this case, the plugin can sort the items based on weights or priorities, such as putting JPG files at the end, MD files at the front, and PDF files in the middle.

Let me digress a bit, which is not related to this topic: We can also set weights for certain keywords, for example, if we encounter mdnotes, we can increase its weight to level 5, so that the file list will prioritize displaying them at the top.

sjhsbhqf avatar Jun 07 '24 00:06 sjhsbhqf