AFFiNE icon indicating copy to clipboard operation
AFFiNE copied to clipboard

​Slash Menu stuck

Open dingemann opened this issue 11 months ago • 10 comments

What happened?

When typing "go t" the Slash-Menu and the whole app gets stuck for 30 seconds. Because I didn't see the "o" showing up I typed it multiple times which appeared later: Bildschirmfoto 2024-03-26 um 09 49 04

Restarting the app gets it running again.

Distribution version

macOS x64 (Intel)

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

No response

Are you self-hosting?

  • [ ] Yes

Relevant log output

No response

Anything else?

No response

dingemann avatar Mar 26 '24 08:03 dingemann

Issue Status: 🔍 Under Investigation

🔍 Under Investigation

We’ve triaged the issue, but now we need to investigate it more thoroughly. This may require processing additional information like logs or dumps.

This is an automatic reply by the bot.

affine-issue-bot[bot] avatar Mar 26 '24 08:03 affine-issue-bot[bot]

Approximately how many docs are there in your workspace?

may be fixed by #6319

EYHN avatar Mar 26 '24 12:03 EYHN

I have 25 docs in my space. I have three different spaces and this only happens in one of them.

dingemann avatar Mar 27 '24 10:03 dingemann

Sorry, I can't reproduce this issue.

The performance of the affine app seems to have slowed down a bit recently, I'm going to deploy some optimizations and let's see if is improvement.

EYHN avatar Mar 27 '24 13:03 EYHN

It seems to be workspace-specific and only happening on one of my workspaces. I can reproduce it consistently. Is there anything I can provide you with, that could help?

dingemann avatar Mar 27 '24 16:03 dingemann

Thanks, it would be very helpful if you can record a CPU profile.

You can follow my screen recording:

https://github.com/toeverything/AFFiNE/assets/13579374/44547412-0350-482b-8242-3a7d274c6d55

EYHN avatar Mar 28 '24 08:03 EYHN

Amazing Screen Recording 🤩 Attached you find the CPU profile. Trace-20240328T181926.json

dingemann avatar Mar 28 '24 17:03 dingemann

By looking at the cpu profile, it looks to me to be related to https://github.com/pacocoursey/cmdk/blob/v0.2.1/cmdk/src/command-score.ts#L81C3-L144C4

pengx17 avatar Mar 29 '24 07:03 pengx17

Great you could find something related @pengx17 . I'm not a programmer, so I can't comment on that part 😅 I'll leave it to you. lmk if you need anything else from me.

dingemann avatar Mar 29 '24 15:03 dingemann

@pengx17 could you already find a solution to the stuck cmdk menu? Currently I cannot use the search function anymore, which is quite tiresome in a bigger space. I already exported an imported the workspace. I is the same - only in this workspace though. Do you have any idea for a workaround for me? Maybe how to find out which page is causing the issue? Thank you so much for your support 🙏

dingemann avatar May 16 '24 17:05 dingemann