Cursor Pyright exceedingly slow

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor pyright go-to-def and find references functionality takes > 60 seconds to complete in small codebase.

As a temp fix, I’ve been able to make it work by adjusting my settings like so:

{
    "python.languageServer": "Jedi",
    "cursorpyright.disableLanguageServices": true
}

Jedi does not seem to suffer from the same sluggish behavior, nor does Pylance when I open the same project in VSCode. So what’s up with Cursor Pyright? My gut says this is related to the fact that I use Pylance in VSCode, and Cursor Pyright forces "python.languageServer": "None", which just feels off even though the Cursor docs say that that’s right.

Steps to Reproduce

  1. Enable Cursor Pyright
  2. <alt + click> on symbol in Python editor to engage go-to-definition/find references.
  3. Wait 60+ seconds for results to populate

Expected Behavior

Fast go-to-def/-ref functionality on par with Jedi/Pylance

Screenshots / Screen Recordings

image

Operating System

Windows 10/11

Version Information

Version: 2.6.11 (system setup)
VSCode Version: 1.105.1
Commit: 8c95649f251a168cc4bb34c89531fae7db4bd990
Date: 2026-03-03T18:57:48.001Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.22631

Does this stop you from using Cursor

Yes - Cursor is unusable

1 Like

Hey, thanks for the detailed report. This is a known pain point with Cursor Pyright. There have been a few similar reports:

Your Jedi workaround is great. A few other things that helped other users:

  1. Add paths to cursorpyright.analysis.exclude to reduce how many files get analyzed, for example .venv, node_modules, and test directories
  2. Set "cursorpyright.analysis.typeCheckingMode": "off". This is especially effective if the codebase does not use type hints much
  3. Alternative: try the pyrefly or ty extensions. They are Rust-based language servers and are much faster

I see you are on SSH. Could you share a couple things so we can dig deeper?

  • Roughly how many Python files are in the project
  • Logs from Output > “Cursor - Pyright” at the time it slows down

I passed this to the team. No ETA yet, but your report helps with prioritization.

Thanks again for the prompt reply. I was on ssh in the screenshots I shared but I’ll note I observed the same behavior on my local machine as well.

I’ll try those cursorpyright.analysis settings and report back.

To answer your questions in the meantime:

  • When I open Preferences > Cursor Settings > Indexing and Docs, Codebase Indexing shows 1,372 files in the index.

  • No new logs are generated during the slow down, but here’s what I see in the output:

    [Info  - 19:21:48.430] [pylance import] Already imported settings globally
    [Info  - 19:21:48.430] [pylance import] Already imported settings for remote ssh-remote://dev-cem-01
    [Info  - 19:21:48.430] [pylance import] Already imported settings for workspace cem [SSH: cem1]
    [Info  - 19:21:48.430] [pylance import] Already imported settings for workspace folder /home/max.gardner/cem
    [Info  - 19:21:48.492] failed to find pyright executable, falling back to bundled:
    /home/max.gardner/venvs/pipeline/bin/basedpyright-langserver
    [Info  - 19:21:48.492] using bundled pyright
    [Info  - 19:21:48.492] running node with argzs: --max-old-space-size=32768
    [Info  - 19:21:48.492] using default node executable
    

Here’s Output > “basedpyright” in case they’re relevant, although not sure exactly when these logs were generated:

Received pythonPath from Python extension: /home/max.gardner/venvs/pipeline/bin/python
[Info  - 7:32:50 PM] Loading pyproject.toml file at /home/max.gardner/cem/pyproject.toml
[Info  - 7:32:50 PM] Setting pythonPath for service "cem": "/home/max.gardner/venvs/pipeline/bin/python"
[Info  - 7:32:50 PM] No include entries specified; assuming /home/max.gardner/cem
[Info  - 7:32:50 PM] Assuming Python version 3.10.12.final.0
[Info  - 7:32:50 PM] Found 581 source files
[Info  - 7:32:53 PM] BG: [BG(1)] Long operation: checking: file:///home/max.gardner/cem/cem_repo/repoman/repoman/tomtom/selected_link.py (2054ms)
[Info  - 7:32:53 PM] BG: [BG(1)] Long operation: analyzing: file:///home/max.gardner/cem/cem_repo/repoman/repoman/tomtom/selected_link.py (2054ms)

Looks like I already had "cursorpyright.analysis.typeCheckingMode": "off", to no avail. And adding dirs to cursorpyright.analysis.exclude didn’t help either.

Hey, thanks for the extra logs and for trying both workarounds.

Sadly, on projects with around 500 to 800+ Python files, Cursor Pyright can really slow down right now, and exclude or typeCheckingMode: off doesn’t always help.

The best option to try next is the pyrefly or ty extension. They’re Rust-based language servers and are much faster. To try them:

  1. Install pyrefly or ty from the Marketplace
  2. Disable the Cursor Python extension to avoid conflicts
  3. You can set python.languageServer back to the default

Just note they don’t support every cursorpyright setting yet, but go-to-definition and find references should be fast.

If pyrefly or ty doesn’t work for you, your current Jedi workaround is still a solid option.