upvote
Syscall spamming is one of the main reasons why computers get slow when many apps are running.

Good software does not do that; when idle, it should only consume RAM, not CPU.

Aside: Browsers, and Electron, seem to always syscall-spam no matter what, which is probably a key reason why people feel that all Electron apps bog down their computers. When your computer gets faster, the software just does more syscall loops per second, for unchanged misery.

reply
From what I recall they generally avoid caching anything and just try to repaint the whole UI really, really fast on every frame so I think that's the design.

It's like how a video game renders, which is their stated goal from the beginning.

I always thought their stated design goals were a bit... wonky.

reply
If you look into strace of something like IMGUI demo on say sdl2+opengl backend, you'll see about same syscall/sec number at 60 fps, but it'll all be sequences of writev, recvmsg, poll, clock_gettime and DRM_IOCTL_SYNCOBJ_ ioctls. Which is basically just polling for input and submitting gpu command buffers, nothing expensive, and nothing a cache can help with.
reply
I've always thought of it as lightweight, but checking it now, wow.
reply
I've found that some of the language servers can really grind up a storm but Zed itself is usually pretty lightweight.
reply
Can you repro my finding?

I'm running on a Zed with only 1 empty text file in it. So language servers should not be in use.

How do you measure "pretty lightweight"?

reply