mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 04:54:24 +00:00
This PR does two things 1. Move PTY child spawning to the background executor. Forking to spawn the terminal child was taking between 10-70ms on profiles I was looking at, which caused frames to be dropped because it was on the foreground thread. This should fix issues such as #57574 where the miniprof from this comment showed terminal creation blocking the foreground thread as well. https://github.com/zed-industries/zed/issues/57574#issuecomment-4546858817 2. Stopped overwriting alacrities exit status with `9` on `AlacTermEvent::Exit` event handling. Before we get the exit event, alacritty emits `ChildExit(status)` with the real status, which we used to overwrite with exit status 9 when handling the AlacTermEvent::Exit. This was an easy fix so I added it in this PR when I noticed the bug. Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - fixed dropped frames caused by agents or users creating new terminals |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||