UI re-focusing becomes slow over time

Describe the Bug

After a long time of using Cursor, I’ve noticed that focusing/unfocusing the window has become very slow. At the same time, closing the editor triggers a popup with “Saving UX state” message, which takes a couple of seconds. I’ve managed to narrow it down to globalStorage folder being too large, after deleting it ($HOME/.config/Cursor/globalStorage) and reconfiguring Cursor again, the UI feels much faster.

Steps to Reproduce

Have a large Cursor config.
Unfocus the window.
Refocus and notice that tabs are not clicking and you can’t type.

Expected Behavior

Fast and furious UI.

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.0
VSCode Version: 1.99.3
Commit: eb5fa4768da0747b79dc34f0b79ab20dbf582020
Date: 2025-07-01T19:54:35.986Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Linux x64 6.15.2-arch1-1

Additional Information

This might be a VSCode bug: VSCode 1.66 slow, laggy when re-focusing/switching back to editing from another window or program · Issue #146737 · microsoft/vscode · GitHub

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi @heraldev and welcome to Cursor Forum

Thank you for the bug report. V1.2 is a pre-release version and Cursor is collecting the bug reports for improvements before public release.

You can find the general thread here,

UPDATE: The issue still persists even after I cleared the state. Cursor is barely usable now

@heraldev Could you go to Help > Open Process Explorer and post here what is consuming so much resources within Cursor?

I don’t see anything out of ordinary there, and I just encounter random UI freezes at this point.

I keep getting more and more freezes, Cursor is barely usable, please help!

Hi @heraldev thank you for the update. Have you already upgraded Cursor to 1.2.4 as that version has had performance updates?

If the UI issue continues after upgrade please check following:

  • When UI freezes, does Cursor consume a lot of memory or CPU? If yes, please post a screenshot of Help > Open Process Explorer to see what is happening there.
  • Use Developer: Open Logs Folder in command palette and check for errors there
  • Check Help > Developer Tools > Console and report errors shown there.
  • Check what folders or files in $HOME/.config/Cursor/globalStorage are getting large, any db file or extensions subfolder?
  • You mentioned Have a large Cursor config, what settings are large or is that the Cursor globalStorage folder?

There are further improvements already in progress but I would need to check if yours are related or another issue altogether.

Currently on it:

Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:59:43.242Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Linux x64 6.15.7-arch1-1

ok thanks, please check the other items I added to my previous comment and let me know the details

Specifically I’m noticing:

  • lag when focusing on the window
  • periodic lag when typing
  • lag when switching between panels inside the editor

I can see one relevant log from main.log:

2025-07-20 23:40:29.906 [warning] No ptyHost heartbeat after 6 seconds

Process explorer:


I don’t see anything out of ordinary there.

Developer console, a few errors, but I don’t think they are relevant:
lastlog.txt (16.7 KB)

These are the largest files in data:

160M    .config/Cursor/User/globalStorage
222M    .config/Cursor/User
261M    .config/Cursor/CachedData

And this is extensions:

86M     .cursor/extensions/ms-python.vscode-pylance-2024.8.1
188M    .cursor

I’ve noticed that restarting Cursor helps, but not for a long time. I will keep updating post with logs during my usage.

Great, thank you for more info.

Findings:

  • The folders are small, I would expect performance issues at GB folder sizes.

  • Process explorer:

    • Shows no CPU load
    • RAM usage shows somewhat larger usage for
      • Next-server: Does handling improve if you restart npm run dev?
      • Ai-agents.ts: Is the ts file large? (approx. lines of code)
    • BG agent: if you merged the background agents code, you can delete the background agent, it would free up also more memory.

Question: what is your total RAM on this device? and how much does Cursor use?

  • Disable all extensions temporarily: Run cursor --disable-extensions from the command line. If issues resolve, re-enable extensions one by one to identify the problematic one.