I am running Logseq on an M1-powered iMac running the latest Ventura beta. I have Logseq always on, as it is my goto app for note-taking, todo lists and time-tracking. I have noticed that the longer I keep Logseq running, the more CPU time it seems to consume. After a few days, CPU load creeps up to 100% for minutes on end, even when Logseq is just sitting idle in the background and hasn’t been touched by me for hours.
I have discovered that - apart from closing and restarting Logseq - the best (and relatively painless) way of getting Logseq to calm down is to re-index my graph. For some reason, that dramatically reduces the CPU time being consumed going forward.
While it is good to know this trick, I wonder what exactly could be causing this behaviour? Could it be a matter of cleaning up the in-memory database Logseq uses that so dramatically improves its performance after a re-index? Or could there be some rogue processes spinning up over time that are not properly stopped until a re-index is executed?
It would be nice to know the underlying reasons for this behaviour, so I can better manage Logseq’s load on my system. Also, if we know what is causing it, maybe future versions can have inbuilt load-management features. I wouldn’t mind, for instance, if rising CPU usage while being idle would trigger Logseq to do a re-index automatically in the background, as a kind of garbage collection, similar to what we used to have in the programming environments I used to work in (I haven’t done any programming in a long, long time, so I don’t know if garbage collection is still a thing).
I would love to know the answer to this. I too find the logseq renderer suddenly becomes unresponsive; usually after I’m switching windows (i.e. working in Logseq, switching to a Chrome website to read an email, and then switching back to Logseq). When I then check activity monitor the renderer is 90-130%, the memory profile isn’t changing. Its very frustrating.
Based on my research, I believe lazy-loading feature to be the cause.
The bug have reported in this closed issue still persists. There’s a suspicion that retrieval through lazy-loading feature is happening incessantly. This might lead to unnecessary resource loading, constant page refreshing, and potential consumption of CPU resources. Ideally, the lazy-loading feature should execute only once upon opening the page.