zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.97k stars 2.7k forks source link

High cpu usage on idle #14833

Open siyia2 opened 1 month ago

siyia2 commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When zed is open it consumes 15%-20% cpu usage just by sitting there.

Environment

Computer Information: Manufacturer: Gigabyte Technology Co., Ltd. Model: GA-78LMT-USB3 6.0 Form Factor: Desktop No Touch Input Detected Processor Information: CPU Vendor: AuthenticAMD CPU Brand: AMD FX(tm)-8300 Eight-Core Processor CPU Family: 0x15 CPU Model: 0x2 CPU Stepping: 0x0 CPU Type: 0x0 Speed: 3300 MHz 8 logical processors 8 physical processors Hyper-threading: Unsupported FCMOV: Supported SSE2: Supported SSE3: Supported SSSE3: Supported SSE4a: Supported SSE41: Supported SSE42: Supported AES: Supported AVX: Supported AVX2: Unsupported AVX512F: Unsupported AVX512PF: Unsupported AVX512ER: Unsupported AVX512CD: Unsupported AVX512VNNI: Unsupported SHA: Unsupported CMPXCHG16B: Supported LAHF/SAHF: Supported PrefetchW: Unsupported Operating System Version: "Manjaro Linux" (64 bit) Kernel Name: Linux Kernel Version: 6.6.40-1-MANJARO X Server Vendor: The X.Org Foundation X Server Release: 12401001 X Window Manager: wlroots wm Steam Runtime Version: steam-runtime_0.20240610.91380 Video Card: Driver: AMD AMD Radeon RX 5500 XT (radeonsi, navi14, LLVM 18.1.8, DRM 3.54, 6.6.40-1-MANJARO) Driver Version: 4.6 (Compatibility Profile) Mesa 24.1.3-manjaro1.1 OpenGL Version: 4.6 Desktop Color Depth: 24 bits per pixel Monitor Refresh Rate: 74 Hz VendorID: 0x1002 DeviceID: 0x7340 Revision Not Detected Number of Monitors: 1 Number of Logical Video Cards: 1 Primary Display Resolution: 1920 x 1080 Desktop Resolution: 1920 x 1080 Primary Display Size: 18.90" x 10.63" (21.65" diag), 48.0cm x 27.0cm (55.0cm diag) Primary VRAM: 4096 MB Sound card: Audio device: Realtek ALC892 Memory: RAM: 15973 Mb VR Hardware: VR Headset: None detected Miscellaneous: UI Language: English LANG: en_US.UTF-8 Total Hard Disk Space Available: 1807727 MB Largest Free Hard Disk Block: 1062225 MB Storage: Number of SSDs: 2 SSD sizes: 2000G,240G Number of HDDs: 0 Number of removable drives: 0

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

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

2024-07-19T21:34:22.413302905+03:00 [INFO] ========== starting zed ========== 2024-07-19T21:34:22.471539011+03:00 [INFO] perform; 2024-07-19T21:34:22.471703366+03:00 [INFO] read_command; 2024-07-19T21:34:22.471824372+03:00 [INFO] Opening main db 2024-07-19T21:34:22.471966298+03:00 [INFO] read_command; 2024-07-19T21:34:22.47224024+03:00 [INFO] socket reader; 2024-07-19T21:34:22.472675678+03:00 [INFO] new; 2024-07-19T21:34:22.473810356+03:00 [INFO] keep_updated; 2024-07-19T21:34:22.476400749+03:00 [INFO] Using git binary path: None 2024-07-19T21:34:22.553487869+03:00 [INFO] extensions updated. loading 1, reloading 0, unloading 0 2024-07-19T21:34:22.553840959+03:00 [INFO] activate is not implemented on Linux, ignoring the call 2024-07-19T21:34:22.590949076+03:00 [INFO] perform; 2024-07-19T21:34:22.591113612+03:00 [INFO] read_command; 2024-07-19T21:34:22.59124909+03:00 [INFO] read_command; 2024-07-19T21:34:22.591459617+03:00 [INFO] socket reader; 2024-07-19T21:34:22.59920281+03:00 [ERROR] DBus error service error org.freedesktop.zbus.Error: The name is not activatable 2024-07-19T21:34:22.599502119+03:00 [INFO] Opening main db 2024-07-19T21:34:22.642965688+03:00 [INFO] Enabling Vulkan Portability 2024-07-19T21:34:22.643150283+03:00 [INFO] Enabling color space support 2024-07-19T21:34:22.653625866+03:00 [INFO] Adapter "AMD Radeon RX 5500 XT (RADV NAVI14)" 2024-07-19T21:34:22.65377521+03:00 [INFO] No ray tracing extensions are supported 2024-07-19T21:34:22.673253939+03:00 [INFO] Using surface present mode MAILBOX 2024-07-19T21:34:22.673976586+03:00 [WARN] Unable to forbid exclusive full screen 2024-07-19T21:34:22.67499158+03:00 [INFO] Creating a descriptor pool for at most 16 sets 2024-07-19T21:34:22.675191797+03:00 [INFO] Creating a descriptor pool for at most 16 sets 2024-07-19T21:34:22.675411021+03:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: PreMultiplied } 2024-07-19T21:34:22.692151572+03:00 [INFO] Using surface present mode MAILBOX 2024-07-19T21:34:22.692783267+03:00 [WARN] Unable to forbid exclusive full screen 2024-07-19T21:34:22.693477294+03:00 [INFO] Initializing Blade pipelines for surface SurfaceInfo { format: Bgra8UnormSrgb, alpha: Ignored } 2024-07-19T21:34:22.711589686+03:00 [INFO] Opening main db 2024-07-19T21:34:22.831448006+03:00 [INFO] Using surface present mode MAILBOX 2024-07-19T21:34:22.83209415+03:00 [WARN] Unable to forbid exclusive full screen 2024-07-19T21:34:22.839962283+03:00 [INFO] Node runtime install_if_needed 2024-07-19T21:34:22.842507719+03:00 [INFO] Opening main db 2024-07-19T21:34:23.395895518+03:00 [INFO] starting language server. binary path: "/home/siyia/.local/share/zed/node/node-v18.15.0-linux-x64/bin/node", working directory: "/", args: ["/home/siyia/.local/share/zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"] 2024-07-19T21:34:23.758927443+03:00 [INFO] Initializing default prettier with plugins {} 2024-07-19T21:34:23.759127942+03:00 [INFO] starting language servers for C++: clangd 2024-07-19T21:34:23.75928461+03:00 [INFO] starting language server "clangd", path: "/mnt/D/Test/iso-commander-5.0.7/src/isocmd/main_general.cpp", id: 1 2024-07-19T21:34:23.759640536+03:00 [INFO] Initializing default prettier with plugins {} 2024-07-19T21:34:23.759795055+03:00 [INFO] starting language servers for C++: clangd 2024-07-19T21:34:24.244227463+03:00 [INFO] Language server with id 0 sent unhandled notification LogMessage: { "level": 0, "message": "[DEBUG] [agent] [2024-07-19T18:34:24.236Z] Agent service starting", "metadataStr": "[DEBUG] [agent] [2024-07-19T18:34:24.236Z]", "extra": [ "Agent service starting" ] } 2024-07-19T21:34:24.248121422+03:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability: { "registrations": [ { "id": "6b35c2b2-5066-45c6-b38e-892e18f548eb", "method": "workspace/didChangeWorkspaceFolders", "registerOptions": {} } ] } 2024-07-19T21:34:24.323734301+03:00 [INFO] Language server with id 0 sent unhandled notification LogMessage: { "level": 0, "message": "[DEBUG] [agent] [2024-07-19T18:34:24.258Z] Telemetry initialized", "metadataStr": "[DEBUG] [agent] [2024-07-19T18:34:24.258Z]", "extra": [ "Telemetry initialized" ] }

JosephTLyons commented 1 month ago

Hey @siyia2, we have a similar issue here:

Is this what you are experiencing as well? Is responsiveness pretty bad when interacting with Zed?

siyia2 commented 1 month ago

no responsiveness in my case seems fine but i get a constant ~+15% cpu usage just from having zed open , however i guess it could be related.

KaeLL commented 1 month ago

Having the same issue, I believe. kwin_wayland jumps from single digits to constant ~50% CPU usage just by having Zed open.

siyia2 commented 1 month ago

i also use wayland with sway

MalindiJohn commented 1 month ago

Zed experience is very nice but the high CPU usage is really not living up to it. It's bad.

dchay commented 3 weeks ago

On Win 11 HP Game Laptop 13th Gen Intel i7 NVidia RTX 4x

Zed 0.149.5 is idling at 20% and forcing my cooling fans to be constantly at max level. For this reason I only use Zed to open my StarFluke C# Unity project for short browsing as I port the C# game to Rust on another IDE.

Most features of Zed are awesome! This CPU thing is a deal breaker for now. But I keep surfing the Zed update waves with hopes of seeing a fix come in. (Too bad I have no bandwidth to find a fix myself right now. LOL.)