Performance issue - how to find the cause

Hi All,

I am happily using Logseq on my iMac M1. Since yesterday, however, there seems to be a performance issue with the editor - fairly regular ‘hangs’ of a few seconds with no response, then everything returns to normal for a minute or so.

Since there hasn’t been any version change, I am wondering what is causing this behaviour. It could be some of the queries I have added, maybe my graph has reached a critical size, maybe one of the pages is getting too long and complex?

My question to this forum is how best to go about finding the underlying cause. Is there a step-by-step strategy to follow that gives me the best chance to find the root cause? Are there any tools out there I may not be aware of?

So, rather than asking for suggested causes and/or solutions, I would love to hear more about ways to systematically approach analysing and solving performance issues.

Replying to my own thread: I think I have identified at least one underlying performance disruptor.

I am using the Git autocommit function to keep my graph synced between my iMac and my iPad (using Working Copy). That did cause some slight lags in the past, but nothing too disturbing. I have just experimented with turning it off and - lo and behold - no more lags, no more hangs. So, Git looks like the culprit. I then maxed out the auto commit from 300 to 600 seconds (I would love to be able to go higher but this is the hard-coded maximum), turned Git autocommit back on, and to my surprise everything is working fine again.

I then turned down the auto commit interval to 300 again (just out of curiosity) and to my even bigger surprise, the lags and hangs haven’t returned. Everything works smoothly and responsive, the way it was a couple of days ago, before the trouble started.

What to make of this then?

First of all: the cliche “have you tried turning it off and on again?” still works! Since the actual interval values didn’t seem to make much of a difference in performance, I can only conclude that the real solution was the fact that I disabled auto commit, restarted Logseq, then enabled it again, and restarted Logseq again. That must have cleared some internal settings going off the rails.

I still don’t know the root cause, of course, but at least I have learned one more trick :-).

2 Likes