toeverything / AFFiNE

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
https://affine.pro
Other
39.92k stars 2.57k forks source link

​Slash Menu stuck #6322

Closed dingemann closed 3 weeks ago

dingemann commented 5 months ago

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?

Relevant log output

No response

Anything else?

No response

affine-issue-bot[bot] commented 5 months ago

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.

EYHN commented 5 months ago

Approximately how many docs are there in your workspace?

may be fixed by #6319

dingemann commented 5 months ago

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

EYHN commented 5 months ago

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.

dingemann commented 5 months ago

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?

EYHN commented 5 months ago

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

dingemann commented 5 months ago

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

pengx17 commented 5 months ago

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

dingemann commented 5 months ago

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 commented 3 months ago

@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 🙏