ae649c66ed45cbb6336a4df35bf234671f088b2c
CLOSES #39042 This is a reopening of #34985+. _Original descrioption_: In Wayland, the client implement key repeat themself. In Zed this is ultimately handled by the gpui crate by inserting a timer source into the event loop which repeat itself if the key is still held down [1]. But it seems the processing of the repeated key event happen synchronously inside the timer source handler, meaning the effective rate become slightly lower (since the repeated timer is scheduled using the 1/rate as delay). I measured the event processing time on my laptop and it's typically around 3ms, but sometimes spiking at 10ms. At low key repeat rates this is probably not _very_ noticeable. I see the default in Zed is set to a (measly) 16/s, but I assume most systems will use something closer to 25, which is a 40ms delay. So ~3ms is around 7.5% of the delay. At higher rate the discrepancy become worse of course. I can visible notice the spikes, and doing some crude stopwatch measurements using gedit as a reference I can reproduce around 5-10% slower rates in Zed. IMO this is significant enough to warrant improving, especially since some people can get quite used the repeat rate and might feel something being "off" in Zed. ~~The suggested fix simply subtract the processing time from the next delay timer.~~ [1] https://github.com/olejorgenb/zed/blob/32df726f3b7fa83e7399f6629c59e0a3f3fff125/crates/gpui/src/platform/linux/wayland/client.rs#L1355 Release Notes: - Improved Wayland (Linux) key repeat rate precision
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
GPUI – Community Edition maintained by Oak Team
https://gpui-ce.github.io/
257 MiB
Languages
Rust
95.5%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.7%
Other
0.3%