100% CPU on MacOS

Operating system

macOS

Joplin version

3.4.5

Desktop version info

Joplin 3.4.5 (prod, darwin)

Sync target

Joplin Cloud

What issue do you have?

Hello,
I have been using Joplin for some days and i have migrated all my Evernote notebooks in it.
It works fine and i really like it. Everything is now synchronized correctly to Joplin Cloud but i have discovered that it uses 100% every time even when app is not used and no sync log is happening.
I have looked at the Console logs and they don't change but the cpu is still 100% for Joplin Helper (renderer) see the screenshot.
What can i do ?
Thanks

Screenshots

Please note that i have tried to kill this process and Joplin asked me to restart in safe mode.

I have tried that but it was the same with a renderer using 100%cpu even in safe mode

Is OCR enabled in the Joplin's settings? If yes, then I think that could be the reason for the high usage.

1 Like

Yes OCR is enabled, i can try to disable it to see if it changes,

but i remember, when it was making OCR extracts that the lines appeared in the console log

After having disabled OCR and restarted it was ok with no 100% CPU, that’s nice

But i want OCR :slight_smile:

I have enabled it again and i hope it will stop using CPU after all extracts are done. Strange i don’t see the OCR creation details in the console log

Still nothing in the console about OCR and CPU at 100%. I hope i could use OCR without having such CPU usage

A suggestion that might help or not: you are using a beta version (3.4.5). Maybe rollback to the current stable version (3.3.13) and see if it helps. Before that, make a JEX export to be safe.

Thanks for your suggestion, that’s strange because i have been using Joplin seriously for some days and i never noticed such issue while all imports, encryptions and sync.

I have tried to go back to 3.3.13 but it doesn’t start as my database is in 3.4.5 version .. Well I have disabled OCR and I hope next version fixes my issue.

In case you want to try a downgrade, follow these steps inspired by How to fix synchronisation issues and start over

  1. on 3.4.5, export a JEX of all your data (very important step)
  2. use victor plugin to delete all local data
  3. sync to delete all data on the sync target
  4. sync all your other devices to delete their local data
  5. fully uninstall 3.4.5
  6. install 3.3.13
  7. import your JEX
  8. sync
  9. enjoy a stable version

Hello,

thanks for these steps. I’m keeping the link for a time i would really need it.

For the moment i have spent several days importing and synchronizing my big notebooks from Evernote so i’m not ready to delete everything and do it again while it works with OCR disabled :slight_smile:

maybe the next pre-release may fix my issue and I’m ready to make some tests if needed to check why OCR is taking 100% without any usage shown in the log

How large is your data set? OCR may take a long time if you've got lots of images, PDF files, etc. attached to your notes.

Around 30GB with many resources, but it seems the OCR has already been scanned for everything : i have seen many line in the console talking about OCR and the resources have OCR tags correctly loaded

Why it's running at 100%, is there any message in the log? Or any warning/error that may be relevant?

Hello Laurent, thanks for your help

Well I will try to show what happens. I have re-enabled OCR in Joplin 3.4.5 and restarted my MacBook Pro M3 Pro

When I launch Joplin, it syncs with Joplin Cloud

And just after that, if I look at my monitor, I have several Joplin renderers, one of them is at 100%

Of course, if i disable OCR and i restart, it won’t happen again.

So I presume it’s the OCR that causes that rise of cpu, but if i enable the logs in Joplin, nothings happens :

is there a specific log for OCR ?

after writing that still no specific log, only sync logs every x minutes

Thanks for your help

i have made a small query on the database to see the status of ocr for the resources and it seems some of them were not processes (status 0), could the problem come from that ? maybe there is some issue to process one pdf and it fails and keeps using 100% ?

just a small update : i have restarted Joplin. Same behaviour but if i filter the log with OCR i have those lines :

is there a way to know which resources it needs to process ? maybe there is a specific issue with oen of them which prevents the service to finish (or to start)

Small update : i have tried Safe mode and it’s the same

And i have enabled flags.txt as mentioned for debugging and i don’t have more messages about OCR

Only telling me there are 3 resources to process.

Last update for the moment :

I have tried to add a new note with a pdf : it immediately launched the OCR and generated ocr text correctly

The only log with “OCR” after i have created the new note (and it worked fine, i have checked in the database) :

image

And still 100% cpu after that

I’m reading the code of Joplin to try and find something but i’m still blocked :slight_smile:

If i stop the OCR, it seems to correctly stop the background service (at least in the logs) but the cpu remains high.

I have tried to start it again without closing and restarting Joplin

But now if i add a single pdf file, it says :

(filter of console log is on “ocr”)

So let’s close and restart Joplin and i have the OCR running on my new resources + 3 resources

for details, here are the resources which have a good mime type for OCR but have the ocr_status set to 0 :

one of them has no note linked.. maybe it should be removed ? maybe it is blocking something for the OCR ?

So does it always print this message on processing resource fd27? Because that would indicate that it's stuck on that particular resource. Any chance you could locate it and see what's special about it?

No : when i add a new pdf, it will start immediately and it will say “Processing resource 1/3 : the_id_of_my_new_resource” and it will process it and add ocr info into database.

But it won’t move to the “Processing resource 2/3” .. it seems 2 resources make it behave strangely but i don’t know which one. Only thing i presume is the small list of resources which have not been processed

I’m trying to remove the e801 note to see if it’s better