Bursts of CPU usage from `anytype --type=renderer` process every couple of seconds

What’s The Bug?

Bursts of CPU usage from anytype --type=renderer process every couple of seconds

How To Reproduce It

  1. Launch Anytype
  2. Try switching spaces back and forth.
  3. Monitor CPU usage of anytype --type=renderer process. You should notice that each 2-3 seconds it occupies CPU briefly, about 5% usage
  4. Close Anytype window leaving it running as tray icon. Notice that it does not affect anytype --type=renderer CPU usage.

In my case after a day or two of running Anytype and interacting with from time to time CPU usage bursts increase in intensity to 40-80%. I have seen that after couple of days of running anytype --type=renderer accumulated 4h+ of CPU usage.

Image or Video

The Expected Behavior

anytype --type=renderer should not consume noticeable amount CPU power while showed content does not change. And surely it should not use CPU while there is no open anytype windows.

Additional Context

This extra CPU usage from Anytype makes my laptop noticeably hotter. I can its fan quieter just by restarting Anytype.

I am thinking about making a workaround. Kind of watcher that will freeze anytype --type=renderer process with SIGSTOP if there are no open Anytype windows.

Profiling with perf turns out to be useless. But I have recorded profile with Debug → Dev Tools → Performance. Anytype consistently crashes if I try to save profile ) So I have made screenshot of recorded profile. Remember there is no interaction with anytype window when profile was recorded.

Device

Thinkpad, whatever

OS

Ubuntu 22.04

Anytype Version

0.42.8

Network Mode

AnySync

Technical Information

OS version: linux x64 6.8.0-47-generic
App version: 0.42.8
Build number: build on 2024-09-06 10:41:02 +0000 UTC at #c583602e975eaf2e525ef7f22e4700f8825a6420
Library version: v0.35.7
Anytype Identity: A6hQj1AtUWnhqFDJvFwpmJHNYJyhRznqLGHXsgdnr7bzHpYe
Analytics ID: 8c1cee72-f885-45ec-b70d-2b62ecd608b7
Device ID: 12D3KooWAm4zgauHDCWGQeSrGLC7wBi1tQtpB6X5LJVhZQBgpjER

This report has been added to our issue tracker and received by the Development Team.

After upgrading to Anytype desktop 0.43 anytype --type=renderer process do not hogs CPU so much. It stops using CPU when Anytype window is not visible. And when the window is open CPU usage is reduced.