zed icon indicating copy to clipboard operation
zed copied to clipboard

Many frames of latency between input and render

Open trbabb opened this issue 9 months ago • 3 comments

Summary

Zed shows multiple frames of latency (I count at least four) between input and render. See the attached video for an example:

https://github.com/user-attachments/assets/09cae02e-3bdf-4f85-9090-2cfc9981a5f0

Steps to trigger the problem:

See video.

Any user input (selection, typing, etc) is not reflected for several frames.

If it turns out to be relevant, I'm viewing on a 4K monitor. Other apps do not seem to show this level of latency.

Actual Behavior:

Lag can be seen when sweep selecting text; observe the difference in pointer position and the end of the selection in the document. You can count the frames between when the pointer reaches an extreme of its oscillation to when the selection reaches the same extreme.

There is also a similar delay in typing, though this is harder to show with video or measure concretely. It manifests as a strong experience of sluggishness when typing.

Expected Behavior:

I would expect no more than one frame of input latency. The demonstration video on Zed's main page advertises 120fps rendering.

Zed Version and System Specs

Zed: v0.177.9 (Zed) OS: macOS 15.3.2 Memory: 32 GiB Architecture: x86_64

trbabb avatar Mar 17 '25 06:03 trbabb

That is definitely an excess delay, and Is very difficult to reproduce with the suped-up m-series macs most of us use. Thanks for providing such a clear visualization!

probably-neb avatar Apr 14 '25 17:04 probably-neb

I'm having the same problem, it's particularly noticeable when using vim mode since you're typing constantly.

Zed Version and System Specs

Zed: v0.183.12 (Zed) OS: macOS 15.3 Memory: 16 GiB Architecture: x86_64 (integrated GPU)

javiersalcedopuyo avatar May 01 '25 10:05 javiersalcedopuyo

https://github.com/user-attachments/assets/12057c25-8f6a-43e9-a457-24f890145eef

I have the same problem.It is very obvious when using the mouse to click.

Zed Version and System Specs Zed: v0.187.9 OS: macOS 15.5 Memory: 32 GB CPU: 2 GHz 4Core Intel Core i5 integrated GPU:Intel Iris Plus Graphics 1536 MB

HETAOSAMA avatar May 28 '25 01:05 HETAOSAMA

I have the same problem. There is noticeably more delay typing than in other programs.

Zed 0.193.3 1.2GHz 4-core Intel Core i7, Iris Plus 16 GB memory macOS 14.6.1

carpelli avatar Jul 07 '25 12:07 carpelli

Same.

  • Zed 0.198.5 on macOS Version 15.6 (24G84)
  • 2 GHz Quad-Core Intel Core i5
  • Intel Iris Plus Graphics 1536 MB
  • 16 GB 3733 MHz LPDDR4X

tmbs avatar Aug 12 '25 06:08 tmbs

Air M2 Zed 0.200.5 537f6781a9dd6d453a3e132e10528982fd299cb5 144hz monitor

Image

j-c-m avatar Aug 25 '25 20:08 j-c-m

I have the same issue.

Zed 0.203.4 M1 MAX 64GB macOS 15.6.1

negcx avatar Sep 25 '25 17:09 negcx

@probably-neb Will this problem be solved?

HETAOSAMA avatar Sep 29 '25 00:09 HETAOSAMA

@j-c-m how were those metrics collected? I'd love to use whatever you did in trying to address this problem

probably-neb avatar Sep 29 '25 14:09 probably-neb

@j-c-m how were those metrics collected? I'd love to use whatever you did in trying to address this problem

https://github.com/frarees/typometer

It can be a bit temperamental with things around the cursor changing or popping up, so I pre-seed the line with some ..... to avoid ligatures.

Image

Current run just to make sure everything is still looking similar to before.

Image

j-c-m avatar Sep 29 '25 15:09 j-c-m