High CPU usage from WindowServer process when Joplin is running (macOS)

Hi,

I've noticed that my MacBook Pro (a 2017 13" Touchbar model) gets really hot after around half an hour running Joplin. Looking at the Activity Monitor, I see the WindowServer process taking between 10 and 30% of CPU permanently when Joplin is open, compared to around 2% when it's closed (with other apps open such as Chrome etc.)

This is with Joplin 2.6.10 (GUI) under macOS 11.6.1 (Big Sur). It is quite a problem as I really need to use note-taking while on the go and it will make a big impact on battery use.

Do you have any plugins installed? If so, disable them and see if the issue persists.

There is no active plugins in my setup at the moment

I'm not sure if the WindowServer process is the culprit (appears to be from CPU usage), but Joplin energy impact is just through the roof (iddle, no sync going on). In addition to heating, this will burn through my battery faster than I can write a couple of notes

1 Like

Is it using the official release?

And is it when a particular note is open, or with all notes?

Is there something special about your note collection, such as many tags or notebooks?

Also do you have anything special on the system like anti-virus, etc. that might be conflicting with Joplin?

1 Like

This is with 2.6.10, latest release.

I have around 8,000 notes in ~200 notebooks for the largest database, but I also see it with the smaller one (2,000 notes in 45 notebooks). So it doesn't appear to be specific to a displayed note. No antivirus (is there something like a system antivirus on macOS?)

How many tags? (you can check from Help > Sync Status). Also is the app doing something, like decrypting items for example?

I have no encrypted notes and I don't use tags (I might have a dozen of them from very old notes).

But wait, I'm testing with the smaller database/regular Joplin now, as the screenshot was made with the larger database, that I launch using an app that is made from an applecript that is just a command line launch a different --profile (this is why it appears as "Joplin Perso" on the list in the monitor). It seems that this regular Joplin is better behaved, but it might be just because the database is smaller.

Mmmh I have seen the heating/drawing on resource consistently with the large database / custom profile using applescript app. I need a bit of time to test independantly the various components and see where is the problem exactly. Right now running the same profile but launching it directly from Terminal seems to behave better :thinking:

Maybe something went wrong with the import...

After testing by launhcing the profile from Terminal directly, it seems to behave OK. I see the large resource use when I launch it using an app made from this script in Script Editor:

do shell script "/Applications/Joplin.app/Contents/MacOS/Joplin --profile /Users/christo/Documents/Joplin/Perso/"

I have no idea why

Unfortunately Apple is useless and unwilling to help customers with such things. Even when you give them proof.

But at least now you know that instances started via Script Editor have a problem.

From your problem determination I can say that it is either a Script Editor problem, a problem with Electron, a combination of both, or a combination of both plus Joplin code.
Big Sur already has all this universal architecture crap in there. Who knows what they f-ed up with call address translation, binary and library calls, lipo, archiver (ranlib, ar), and different combinations of all of the above.

Looking at what happens after syncing on another computer, some of the high usage might be Spotlight overhead (I see the mds process taking 100% CPU right now). In that case it will likely be transient and stops once the database is indexed (it's all md files so it should be easily indexed). By the way, is there a Spotlight plugin to directly find notes with the system-wide search?

Joplin doesn't store notes as .md files, all the data is stored in a single sqlite database in your profile directory.

The .md files you might find inside your sync target are not simply versions of your notes, it contains all kinds of meta, deltas and sync related data and should be considered the same as a database rather than a simple file store - if you mess with them or you will likely break your sync target entirely.

1 Like

On Linux, there is high CPU usage when the Sync icon is animated while syncing. There is an issue on github: High CPU usage when sync fails using webdav · Issue #4047 · laurent22/joplin · GitHub

As a workaround when on battery, I close joplin, take notes in text editor, and paste into joplin later at my review time.

If this is currently a valid workflow for you then you might be interested in the hotfolder plugin where you can just drop your notes into a folder and it will integrate them automatically.

For whatever it may be worth, ... I am running Joplin for 1.5 years on a similar Macbook Pro, high number of notes, sync over Webdav and Nextcloud. I have never seen any problem like the one described. I do not have any notes with PDFs, audio, or video.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.