Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU on Intel Mac (1000%+) - Python Language Server? #22426

Open
1 task done
alexanderturner opened this issue Dec 26, 2024 · 0 comments
Open
1 task done

High CPU on Intel Mac (1000%+) - Python Language Server? #22426

alexanderturner opened this issue Dec 26, 2024 · 0 comments
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@alexanderturner
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Zed seems to be incredibly resource hungry when dealing with a reasonably sized Python FastAPI app. CPU usage is constantly bursting to well over 1000% as indicated by iStatMenus and Activity Monitor and editor slows to a crawl.

It only occurs when Zed starts and looking at the logs, appears to be when the language server is doing it's thing. Not sure where to start debugging here, but something definitely doesn't seem right unless Zed is trying to help me Sous Vide my thighs with my MBP.

Zed Version and System Specs

Zed: v0.166.1 (Zed)
OS: macOS 15.1.1
Memory: 64 GiB
Architecture: x86_64

If applicable, add screenshots or screencasts of the incorrect state / behavior

Screenshot 2024-12-26 at 11 57 04 am

If applicable, attach your Zed.log file to this issue.

Zed.log
Last login: Thu Dec 26 11:54:09 on ttys000
cat ~/Library/Logs/Zed/Zed.log%
 ~  cat ~/Library/Logs/Zed/Zed.log | pbcopy
 ~  tail -f  ~/Library/Logs/Zed/Zed.log
  "schemaUri": "https://json.schemastore.org/fly.json",
  "meta": {
    "name": "fly.io Configuration",
    "description": "fly.io, a cloud provider, configuration",
    "source": "catalog",
    "catalog_url": "https://www.schemastore.org/api/json/catalog.json"
  }
}
2024-12-26T11:54:09.894089+11:00 [INFO] language server 2: unregistered workspace/DidChangeWatchedFiles capability with id e06c5304-d19e-4a85-b140-fdd4af17689c
2024-12-26T11:55:11.270744+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:07:02.373237+11:00 [INFO] attempting to start language server "pylsp", path: "/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/dist/typeshed-fallback/stubs/requests/requests/api.pyi", id: 11
2024-12-26T12:07:02.391986+11:00 [INFO] starting language server process. binary path: "/Users/aturner/Library/Application Support/Zed/languages/pylsp/pylsp-venv/bin/pylsp", working directory: "/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/dist/typeshed-fallback/stubs/requests/requests", args: []
2024-12-26T12:07:02.420279+11:00 [WARN] skipping diagnostics update, no worktree found for path "/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/dist/typeshed-fallback/stubs/requests/requests/api.pyi"
2024-12-26T12:07:02.437867+11:00 [WARN] skipping diagnostics update, no worktree found for path "/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/dist/typeshed-fallback/stubs/requests/requests/api.pyi"
2024-12-26T12:07:02.438289+11:00 [ERROR] oneshot canceled
2024-12-26T12:07:04.611584+11:00 [INFO] attempting to start language server "pylsp", path: "/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/dist/typeshed-fallback/stubs/requests/requests/api.pyi", id: 12
2024-12-26T12:07:04.627677+11:00 [INFO] starting language server process. binary path: "/Users/aturner/Library/Application Support/Zed/languages/pylsp/pylsp-venv/bin/pylsp", working directory: "/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/dist/typeshed-fallback/stubs/requests/requests", args: []
2024-12-26T12:07:04.711121+11:00 [WARN] skipping diagnostics update, no worktree found for path "/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/dist/typeshed-fallback/stubs/requests/requests/api.pyi"
2024-12-26T12:07:04.74319+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.620726+11:00 [INFO] attempting to start language server "pylsp", path: "/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/dist/typeshed-fallback/stubs/requests/requests/models.pyi", id: 13
2024-12-26T12:10:07.621222+11:00 [INFO] starting language server process. binary path: "/Users/aturner/Library/Application Support/Zed/languages/pylsp/pylsp-venv/bin/pylsp", working directory: "/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/dist/typeshed-fallback/stubs/requests/requests", args: []
2024-12-26T12:10:07.653307+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.653753+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.654124+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.65446+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.654754+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.6551+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.655432+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.655771+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.656144+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.656524+11:00 [ERROR] oneshot canceled
2024-12-26T12:10:07.753618+11:00 [ERROR] timed out waiting on app_will_quit
2024-12-26T12:10:11.525937+11:00 [INFO] ========== starting zed ==========
2024-12-26T12:10:11.61998+11:00 [INFO] Opening main db
2024-12-26T12:10:11.621426+11:00 [INFO] Opening main db
2024-12-26T12:10:11.844626+11:00 [INFO] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2024-12-26T12:10:12.304861+11:00 [ERROR] theme not found: Tokyo Night Storm
2024-12-26T12:10:12.306479+11:00 [INFO] No prompt template overrides directory found at /Users/aturner/.config/zed/prompt_overrides. Using built-in prompts.
2024-12-26T12:10:12.308174+11:00 [INFO] extensions updated. loading 10, reloading 0, unloading 0
2024-12-26T12:10:12.412796+11:00 [INFO] Opening main db
2024-12-26T12:10:12.424595+11:00 [ERROR] theme not found: Tokyo Night Storm
2024-12-26T12:10:12.428281+11:00 [ERROR] theme not found: Tokyo Night Storm
2024-12-26T12:10:12.429766+11:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-12-26T12:10:12.430747+11:00 [ERROR] theme not found: Tokyo Night Storm
2024-12-26T12:10:12.479147+11:00 [INFO] Opening main db
2024-12-26T12:10:12.486679+11:00 [INFO] set status on client 0: Authenticating
2024-12-26T12:10:12.488509+11:00 [INFO] open paths ["/Users/aturner/Downloads/quote-response.json"]
2024-12-26T12:10:12.489159+11:00 [INFO] Opening main db
2024-12-26T12:10:12.493839+11:00 [INFO] open paths ["/Users/aturner/.config/zed/settings.json"]
2024-12-26T12:10:12.496157+11:00 [INFO] set status on client 241075: Connecting
2024-12-26T12:10:12.581953+11:00 [ERROR] buffer has no file
2024-12-26T12:10:12.582156+11:00 [ERROR] buffer has no file
2024-12-26T12:10:12.582297+11:00 [ERROR] buffer has no file
2024-12-26T12:10:12.582443+11:00 [ERROR] buffer has no file
2024-12-26T12:10:12.590538+11:00 [INFO] Opening main db
2024-12-26T12:10:12.611269+11:00 [INFO] attempting to start language server "json-language-server", path: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", id: 1
2024-12-26T12:10:12.611555+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.613243+11:00 [INFO] attempting to start language server "package-version-server", path: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", id: 2
2024-12-26T12:10:12.613474+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.614056+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.616652+11:00 [INFO] fetching latest version of language server "json-language-server"
2024-12-26T12:10:12.617049+11:00 [INFO] Node runtime install_if_needed
2024-12-26T12:10:12.64814+11:00 [INFO] fetching latest version of language server "package-version-server"
2024-12-26T12:10:12.670159+11:00 [INFO] attempting to start language server "pyright", path: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", id: 3
2024-12-26T12:10:12.670383+11:00 [INFO] attempting to start language server "pylsp", path: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", id: 4
2024-12-26T12:10:12.67334+11:00 [INFO] attempting to start language server "yaml-language-server", path: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", id: 5
2024-12-26T12:10:12.673571+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.696709+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.706713+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.707713+11:00 [INFO] fetching latest version of language server "pylsp"
2024-12-26T12:10:12.707892+11:00 [INFO] downloading language server "pylsp"
2024-12-26T12:10:12.708104+11:00 [INFO] fetching latest version of language server "yaml-language-server"
2024-12-26T12:10:12.710909+11:00 [INFO] attempting to start language server "json-language-server", path: "/Users/aturner/.config/zed/settings.json", id: 6
2024-12-26T12:10:12.711142+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.721606+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.721897+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.728872+11:00 [INFO] set environment variables from shell:/bin/zsh, path:/Users/aturner/miniconda3/condabin:/usr/local/opt/ruby/bin:/usr/local/opt/[email protected]/libexec/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/usr/local/bin:/usr/local/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/usr/local/go/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/bin:/Users/aturner/Code/go/bin:/Users/aturner/.rvm/bin
2024-12-26T12:10:12.734036+11:00 [INFO] attempting to start language server "json-language-server", path: "/Users/aturner/Downloads/quote-response.json", id: 7
2024-12-26T12:10:12.734274+11:00 [INFO] attempting to start language server "package-version-server", path: "/Users/aturner/Downloads/quote-response.json", id: 8
2024-12-26T12:10:12.734485+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:12.734709+11:00 [INFO] fetching latest version of language server "json-language-server"
2024-12-26T12:10:12.797408+11:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-12-26T12:10:13.248205+11:00 [INFO] downloading language server "package-version-server"
2024-12-26T12:10:13.807402+11:00 [INFO] using project environment variables shell launched in "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo". PATH="/Users/aturner/miniconda3/condabin:/usr/local/opt/ruby/bin:/usr/local/opt/[email protected]/libexec/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/usr/local/bin:/usr/local/sbin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/usr/local/go/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/bin:/Users/aturner/Code/go/bin:/Users/aturner/.rvm/bin"
2024-12-26T12:10:13.835278+11:00 [INFO] starting language server process. binary path: "/Users/aturner/Library/Application Support/Zed/languages/package-version-server/package-version-server-v0.0.7", working directory: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", args: []
2024-12-26T12:10:13.839326+11:00 [INFO] starting language server process. binary path: "/Users/aturner/Library/Application Support/Zed/languages/package-version-server/package-version-server-v0.0.7", working directory: "/Users/aturner/Downloads", args: []
2024-12-26T12:10:14.177585+11:00 [INFO] add_connection;
2024-12-26T12:10:14.178416+11:00 [INFO] set status on client 241075: Connected { peer_id: PeerId { owner_id: 629, id: 6103640 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-12-26T12:10:15.191524+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:15.19236+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:15.192981+11:00 [INFO] Initializing default prettier with plugins {}
2024-12-26T12:10:15.193491+11:00 [INFO] attempting to start language server "docker-compose", path: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", id: 9
2024-12-26T12:10:15.194139+11:00 [INFO] attempting to start language server "taplo", path: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", id: 10
2024-12-26T12:10:15.892527+11:00 [INFO] fetching latest version of language server "pyright"
2024-12-26T12:10:16.425389+11:00 [INFO] starting language server process. binary path: "/Users/aturner/Library/Application Support/Zed/extensions/work/toml/taplo-0.9.3/taplo", working directory: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", args: ["lsp", "stdio"]
2024-12-26T12:10:16.85198+11:00 [INFO] downloading language server "json-language-server"
2024-12-26T12:10:17.457948+11:00 [INFO] downloading language server "json-language-server"
2024-12-26T12:10:18.243636+11:00 [INFO] downloading language server "yaml-language-server"
2024-12-26T12:10:18.420341+11:00 [INFO] starting language server process. binary path: "/Users/aturner/Library/Application Support/Zed/languages/pylsp/pylsp-venv/bin/pylsp", working directory: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", args: []
2024-12-26T12:10:18.518831+11:00 [INFO] starting language server process. binary path: "/usr/local/bin/node", working directory: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", args: ["/Users/aturner/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2024-12-26T12:10:18.520393+11:00 [INFO] starting language server process. binary path: "/usr/local/bin/node", working directory: "/Users/aturner/.config/zed", args: ["/Users/aturner/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2024-12-26T12:10:18.738202+11:00 [INFO] downloading language server "pyright"
2024-12-26T12:10:19.004983+11:00 [INFO] starting language server process. binary path: "/usr/local/bin/node", working directory: "/Users/aturner/Downloads", args: ["/Users/aturner/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
2024-12-26T12:10:20.400334+11:00 [INFO] starting language server process. binary path: "/usr/local/bin/node", working directory: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", args: ["/Users/aturner/Library/Application Support/Zed/languages/yaml-language-server/node_modules/yaml-language-server/bin/yaml-language-server", "--stdio"]
2024-12-26T12:10:20.719817+11:00 [INFO] starting language server process. binary path: "/usr/local/bin/node", working directory: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", args: ["/Users/aturner/Library/Application Support/Zed/languages/pyright/node_modules/pyright/langserver.index.js", "--stdio"]
2024-12-26T12:10:20.97283+11:00 [WARN] unhandled capability registration: Registration { id: "17ea2e36-cf5b-4e5a-b02f-db4c04931741", method: "workspace/didChangeWorkspaceFolders", register_options: Some(Object {}) }
2024-12-26T12:10:20.973177+11:00 [WARN] unhandled capability registration: Registration { id: "0a9d65d7-4a2e-41f4-b4c4-658606c3cf20", method: "workspace/didChangeConfiguration", register_options: Some(Object {}) }
2024-12-26T12:10:21.044267+11:00 [INFO] starting language server process. binary path: "/usr/local/bin/node", working directory: "/Users/aturner/Code/go/src/github.com/qdynamicsco/circuitwise-obo", args: ["/Users/aturner/Library/Application Support/Zed/extensions/work/docker-compose/node_modules/.bin/docker-compose-langserver", "--stdio"]
2024-12-26T12:10:21.282851+11:00 [INFO] language server 3: unregistered workspace/DidChangeWatchedFiles capability with id e7708252-06c9-449d-81d6-6c012e2d616c

@alexanderturner alexanderturner added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

1 participant