Anthony Eid 36b6d0951f gpui: Stop sealing empty intervals on idle frame skips (#65057)
## Summary

Follow-up to #64958. macOS (display link), Windows (`VSyncProvider`) and
X11 (refresh timer) deliver a frame request on every refresh while a
window is visible. Since frame skips became interval boundaries, each
idle refresh:

- sealed an empty snapshot that the hang monitor thread had to build and
discard, and
- flushed folded sub-floor task polls into the journal via the
platform-signal and skip records. Flushed polls reach the sealer even
when end-of-turn idle handling discards folded-only work, so idle
wake-ups could again accumulate toward a later frame budget, which is
what that rule exists to prevent.

Changes:

- `FrameSkipped` boundaries follow the same rule as idle boundaries:
they're recorded only when an event was retained since the last
boundary.
- `PlatformSignal` and `ReentrantFrameSkipped` are published as point
records that leave folded polls folded.
- The sealer no longer seals empty intervals.
- Throttled and no-render skips still seal real work, so GPUI's own
frame-rate limits (inactive windows, thermal pressure) aren't counted as
dropped frames.
- Cleanups: the throttle carries a `FrameRateLimit` enum instead of
`(Duration, bool)` with an underscore-named binding, `#[repr(u8)]` is
removed from `FrameRequestSource`, and `PlatformFrameSignal::record`
uses `expect(unused_variables)` in profiler-disabled builds instead of
`let _ = (at, source);`.

## Testing

- New `idle_refreshes_seal_nothing_and_keep_polls_folded`: refreshes
with folded polls and no retained work publish only platform signals and
seal nothing.
- Updated skip tests to give skips retained work. A late signal without
work now seals nothing.
- `cargo test -p gpui --features profiler --lib` (438 passed),
profiler-disabled frame-signal and window tests, `./script/clippy -p
gpui`, Windows (`--no-default-features`) clippy, wasm32 check.

Release Notes:

- [GPUI] Fixed idle frame requests sealing empty hang-detection
intervals and flushing folded task polls on every refresh
2026-10-01 20:45:11 +00:00
…
…
…
…
…
…
…
…
…
…
…

Zed

Zed CI

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 (macOS/Linux/Windows).

Other platforms are not yet available:

Developing Zed

Contributing

See CONTRIBUTING.md for ways you can contribute to Zed.

Also... we're hiring! Check out our jobs page for open roles.

Licensing

Zed source code is licensed primarily under GPL-3.0-or-later, with Apache-2.0 components where marked.

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 specified error for a crate you've created? If so, add publish = false under [package] in your crate's Cargo.toml.
  • Is the error failed to satisfy license requirements for 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 the accepted array in script/licenses/zed-licenses.toml.
  • Is cargo-about unable to find the license for a dependency? If so, add a clarification field at the end of script/licenses/zed-licenses.toml, as specified in the cargo-about book.

Sponsorship

Zed is developed by Zed Industries, Inc., a for-profit company.

If you’d like to financially support the project, you can do so via GitHub Sponsors. Sponsorships go directly to Zed Industries and are used as general company revenue. There are no perks or entitlements associated with sponsorship.

S
Description
No description provided
Readme 1.5 GiB
Languages
Rust 95.5%
JSON-with-Comments 2.3%
Python 0.8%
Inno Setup 0.3%
Tree-sitter Query 0.3%
Other 0.3%