org-roam icon indicating copy to clipboard operation
org-roam copied to clipboard

(feat)db: use filenotify to trigger db updates

Open jethrokuan opened this issue 4 years ago • 2 comments

Using filenotify to trigger db updates is the most reliable way to ensure the database is always up to date, making it resilient to changes from outside Emacs.

This will also address issues seen in #1765, although the root cause should also be patched.

jethrokuan avatar Aug 17 '21 10:08 jethrokuan

@jethrokuan Any arguments against https://github.com/org-roam/org-roam/pull/1779/commits/9401fad1b284c10e7e58cda3d2a3b46a39b70a7c? It works, but can temporary block Emacs to process the directory in the database.

Wetlize avatar Aug 22 '21 22:08 Wetlize

@Wetlize No objections here. I was thinking of queuing changes to process, and then processing them only when required: this could be before the org-roam buffer display, or just on an idle-timer. This can reduce a lot of unnecessary re-computation, especially when the same file is frequently saved over.

jethrokuan avatar Aug 25 '21 04:08 jethrokuan