server icon indicating copy to clipboard operation
server copied to clipboard

feat: add an option to filter what paths get checked for updates

Open icewind1991 opened this issue 8 months ago • 4 comments

An example use case would be a external storage where the root contains a very large number of sub-directories but each sub-directory is fairly small.

Currently trying to browse the root of the external storage will be slow (since the "check for update" cost scales with the number of items in directory) leading to a bad user experience. Disabling the "check for update" on the storage would make it fast but will lead to the filecache being out of date over time.

This would allow an admin to configure the instance so only the sub-directories are being checked for updates, while an external process (such as a periodic shallow-scan) can check for any changes to the root directory. Leading to an improved browsing experience for the user at the cost of a possible delay for new items in the root directory. (Though systems like notify could be used to help there)

Currently this can only be configured by setting the mount option manually, in the future we might want to provide some curated presets in the ui.

Example for configuring it to not check the root folder as in the scenario described above:

occ files_external:option <mount id> filesystem_check_filter '/^.+$/'

icewind1991 avatar Apr 25 '25 18:04 icewind1991

/backport to stable32

icewind1991 avatar Sep 29 '25 16:09 icewind1991

/backport to stable31

icewind1991 avatar Sep 29 '25 16:09 icewind1991

A small unit test would be nice though ;)

kesselb avatar Nov 14 '25 11:11 kesselb

update @since, added tests and changed some type hints from classes to interfaces

icewind1991 avatar Nov 20 '25 17:11 icewind1991