SYSTEM INFO:
Obsidian version: v1.5.2
Installer version: v1.4.13
Operating system: Windows 10 Pro 10.0.22631
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Additional information
The usual workaround for this problem is to close and reopen Obsidian or invoke Reload app without saving command, but for big vaults such workarounds adds undesired waiting time.
Yes, this is located on NVMe SSD with NTFS file system.
It might happen with only a few files as well but it is significantly more difficult to reproduce. I have a feeling that it is happening when the background Metadata Cache Worker is busy indexing some files, it can miss new files updates.
After investigation, I came to conclusion: all file system watchers in Node.js are using fs.watch(), which uses ReadDirectoryChangesW Windows API, which is not 100% reliable and can miss some events, especially if many of them happens at once.
The only way to ensure the changes are not missed, is to do a regular polling. Doing it too often, will degrade the performance, especially for the large vaults.
chokidar has convenient additional polling mechanism.
Obsidian team could consider doing something similar.
Damn @mnaoumov that is good research and kind of unfortunate nasty bug in Windows. Hard to believe they left this bug to persist for so long. I don’t use Windows much, maybe only 10% of the time so I haven’t been bitten by this bug. I hope at least, if implemented, the fix would target Windows only to avoid unnecessary polling on other OS’es.