org-roam-server
org-roam-server copied to clipboard
Jittery behavior of nodes in browser
Hi: First of all, thank you so much for creating this. It's added a whole new dimension of usefulness to my org-roam files, fantastic work. I have a small issue with the visualization of the server in my browser. The bouncy animation repeats every few seconds, and the nodes kind of 'jitter' around. Any idea what could be behind this? Occurs in both Firefox and Chrome. Thank you!
Hi: First of all, thank you so much for creating this. It's added a whole new dimension of usefulness to my org-roam files, fantastic work.
Thank you!!
I have a small issue with the visualization of the server in my browser. The bouncy animation repeats every few seconds, and the nodes kind of 'jitter' around. Any idea what could be behind this? Occurs in both Firefox and Chrome. Thank you!
Currently the server checks for modification date
on db file to update the graph. Can you check if your org-roam db file updates when the jitter happens. During development I had that jitter too but as far as I remember I fixed it before pushing it to the github but I might have pushed it, can you check your org-roam-server, it should be 20201005.1521
I fixed it before pushing it to the github but I might have pushed it, can you check your org-roam-server, it should be 20201005.1521
Yeah this is the version of org-roam-server I've got.
Can you check if your org-roam db file updates when the jitter happens
From what I can tell it's not updating when the jitter happens, at least there's no message in the minibuffer indicating that. Is there a better way to see if this is what's happening?
You can use watch -n 0.1 ls -lh org-roam.db
command to run ls -lh
on org-roam.db
automatically and wait for jitter.
Thanks, followed your suggestion, but the jitter seems to be happening independently of org-roam.db updates
Can you check org-roam-server-db-last-modification
, it should has the same value with your db file when converted to the date format. int -> date
So the org-roam-server-db-last-modification
variable is updating every few seconds in sync with the jitter, but it doesn't look like the org-roam.db
file is being modified: it updates after I make an edit, and remains unchanged after that.
Can you try to dig a little bit more to find out why is it changing constantly. On my side, it always stays constant if the db is not changing.
Yeah I'll look into that and let you know. Thanks!
I had the same problem here and found out the source of jittery.
C-h v org-roam-db-location
Documentation:
The full path to file where the Org-roam database is stored.
If this is non-nil, the Org-roam sqlite database is saved here.
It is the user’s responsibility to set this correctly, especially
when used with multiple Org-roam instances.
I had not explicitly defined the value of this variable, so it was nil
, when I informed the right path, I got all working fine.
I had the same problem here and found out the source of jittery.
C-h v org-roam-db-location
Documentation: The full path to file where the Org-roam database is stored. If this is non-nil, the Org-roam sqlite database is saved here. It is the user’s responsibility to set this correctly, especially when used with multiple Org-roam instances.
I had not explicitly defined the value of this variable, so it was
nil
, when I informed the right path, I got all working fine.
Yes, setting org-roam-db-directory
fixes the problem. I didn't set org-roam-db-directory
while developing and haven't had any issues but today I experienced the same jittering and when I check org-roam-db-directory
, it was nil
Maybe instead of using org-roam-db-location
(require 'f)
(defvar org-roam-server-db-location)
(setq org-roam-server-db-location
(concat (f-full org-roam-directory) "org-roam.db"))
can be used.
After "C-h v org-roam-db-location", the value is nil, I modified it as “~/Library/Mobile Documents/iCloud~com~appsonthemove~beorg/Documents/org/org-roam.db” within double qutoes, it worked well. Then it displays as follow: Its value is
""/Users/myusername/Library/Mobile Documents/iCloud~com~appsonthemove~beorg/Documents/org/org-roam.db"" Original value was nil
You can customize this variable.