AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

[Bug]: Insane amount of CPU usage when using the windows editor desktop app

Open 6im0n opened this issue 7 months ago • 11 comments

What happened?

I've noticed extremely high CPU usage when using the Affine desktop app, even when performing very basic tasks like typing on a blank page.

Steps to reproduce:

Open the Affine desktop app (latest version as of today).

Create a new blank page.

Start typing normally.

Expected behavior:

Minimal CPU usage while typing on a blank page.

Actual behavior:

CPU usage is about 30–50% consistently, only tiping

System details:

OS: Win 11 24H2

CPU: Intel Core i5-10310U

RAM : 16GO

Affine Version: 0.21.6 (server and client)

Additional info:

Image

I’ve attached a screenshot showing the CPU usage spiking while typing. This seems abnormal for a simple tiping.

Please let me know if you need logs or additional diagnostics.

Distribution version

Windows x64

App Version

Affine 0.21.6

What browsers are you seeing the problem on if you're using web version?

No response

Are you self-hosting?

  • [x] Yes

Self-hosting Version

0.21.6

Relevant log output


Anything else?

No response

6im0n avatar May 05 '25 09:05 6im0n

Issue Status: 🆕 *Untriaged

*🆕 Untriaged

The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.

affine-issue-bot[bot] avatar May 05 '25 09:05 affine-issue-bot[bot]

The cpu consumption hardly depends on the size of your workspace and docs. There will be an indexer running in the backend when the content of docs change, to let you always can search docs with latest content. We've already throttled the indexer's running, but it can't be 100% suppressed.

In 0.22, we will introduce Cloud Index, and you may able to disable client indexing by then, but you will lose search ability if your device go offline or lose the connection to your self-hosted server.

forehalo avatar May 07 '25 02:05 forehalo

Thanks for your response, but does the indexer run in the entire workspace when typing, or just on the page that is currently being edited? Because for a small page, it is really power-hungry.

Nice feature to run the indexer on the server side :)

6im0n avatar May 13 '25 07:05 6im0n

Image

high CPU usage for hours. small workspace. version 0.23.2

ATPs avatar Jul 24 '25 08:07 ATPs

I'm seeing similar behavior on my Mac, with WindowServer, Affine Helper GPU, and Affine Helper Renderer drawing high power on a constant basis at idle. Interestingly, this only seems to impact the desktop app, with the web version not facing the same issues (I'm using Safari).

Image

Running MacOS 15.4, desktop client 0.23.2 and server 0.23.0.

seangineer avatar Jul 27 '25 09:07 seangineer

Also having this issue, and by the time I got home from work affine was fully unresponsive and had blown up to a massive amount of ram and cpu usage. Windows standard desktop version. Also upon testing, the desktop app is basically unusable, im getting input delays on typing every 1-2 seconds. The web app works excellently. I have a 5080 and 9800x3d with 64gb of ram with low utilization, so this kind of performance in the desktop app is clearly broken.

JackHunzicker avatar Aug 03 '25 17:08 JackHunzicker

Are there any updates on this issue? I'm still having this problem with the desktop app.

servedio1 avatar Sep 27 '25 03:09 servedio1

Sadly there's still no updates on that issue

EchoBlr avatar Oct 10 '25 20:10 EchoBlr

Same here. Have self-hosted setup that i installed yesteday - Love it BTW. My workbook/valut so to speak is empty. Brand new. Running the Windows client causes the same CPU issues as above, as well as delayed input every 1-3 seconds as I type. I am hopeful for a fix/optimisation.

mchooha avatar Oct 27 '25 00:10 mchooha

I face the same problem, so I have given up using windows client.

ikelvingo avatar Oct 29 '25 01:10 ikelvingo

Reporting the same issue. Typically running around 30 to 40 percent. Windows 11, Core i9-10850k cpu @ 3.6 GHz

marcellusk avatar Oct 31 '25 05:10 marcellusk

same problem on Linux, when AFFiNE is "idle'" (read: I'm not using it)

bschelst avatar Dec 11 '25 10:12 bschelst