Live data from Hacker News

Desktop compositing latency is real

lofibucket.com

191–200 of 306 posts

Re: Desktop compositing latency is real

#191
post #76

Earlier quoted context omitted.

The little plastic bits always snap off. Ethernet is great for semipermanent wires but not very good for peripherals like portable hard drives that are constantly disconnected and reconnected.

That problem is largely solved if you use 8P8C connectors with a rubber boot protecting the latching tab. https://info.pcboard.ca/wp-content/uploads/2017/04/RJ45-Conn...

You can't tell me that's better than the USB-C connector.

Even HDMI is better.

Re: Desktop compositing latency is real

#192
post #189
post #23

This is also why picking a good monitor is important for software development. Some monitors have tons of input lag (60-70ms) and that's the time it takes for you to see what you're typing to reach the display. This also includes the time it takes to see you move your mouse cursor too. I did a huge write up on picking a good monitor for development which can be found at: https://nickjanetakis.com/blog/how-to-pick-a-g…

Why not go with 5k 27" monitor? http://www.dell.com/en-us/work/shop/cty/pdp/spd/dell-up2715k... Sure, it's over $1k, but if you're making $10k/mo writing code on it, then you should be able to afford it.

Marginal Utility. A $400 27" 4k Ultrasharp isn't 1/3rd as good as a 5k 27" Ultrasharp.

Re: Desktop compositing latency is real

#193
post #130

I will gladly believe this is a real problem, but this page does not demonstrate that (at least not convincingly); the metric used is simply too poor. To quote: > I used my own hacky measurement program written in C++ that sends a keypress to the application to be benchmarked. Then it waits until the character appears on screen. Virtual keypresses were sent with WinAPIs SendInput and pixels copied off screen with Bit…

Just another point of data with compton compositor on Arch with several text editors. https://news.ycombinator.com/item?id=14800713

Re: Desktop compositing latency is real

#194
If you want to have the most minimal Windows setup:

- Don't use an antivirus

- Stop unused services running in the background (e.g: services.msc)

- Turn off all vision effects including compositing and animation

Then you might want to set up a firewall to block all the nonsense like SMB, NetBIOS, etc. You can also set up a cheap old machine to act as your firewall, reverse proxy cache, antivirus/antispam, etc.

You can set up a script to turn on all the printing related services when you are actually going to use a printer.

Re: Desktop compositing latency is real

#195
post #76

Earlier quoted context omitted.

The little plastic bits always snap off. Ethernet is great for semipermanent wires but not very good for peripherals like portable hard drives that are constantly disconnected and reconnected.

Yeah, live hinges (that is, plastic bits that intentionally bend, not rotate on pins) are always going to break eventually. They're just so easy to make that it's a trade off that doesn't fall in the consumer's favor.

Living hinges can have lifespan in the millions of cycles with the correct materials and design. I'm sure it's possible to make an Ethernet connector that doesn't break easily, but it would cost more, and people aren't willing to pay.

Re: Desktop compositing latency is real

#196
post #12

That's why I prefer to play games in fullscreen as opposed to "borderless windowed", I have noticed quite a bit of input lag in the latter mode.

This is because fullscreen mode allows the use of something called "DirectDraw Exclusive mode" which bypasses Windows for making calls to the GPU. https://msdn.microsoft.com/en-us/library/windows/desktop/dd3...

I wonder if it would be feasible to use this to reduce input lag in an editor?

Re: Desktop compositing latency is real

#197

Earlier quoted context omitted.

> "or GNU/Linux desktop" I believe Wayland has made some latency improvements.

Wayland uses a composition model which is inherently slower than having direct access to the front buffer.

And then Gnome goes and does it one "better" by hooking the mouse pointer directly to the main render loop...

Re: Desktop compositing latency is real

#198

I've been experimenting with this too, in the context of the Windows front-end for xi editor. It's absolutely true that the compositor adds a frame of latency, but I have a very different take than "turn it off." First, it's possible to design an app around the compositor. Instead of sending a frame to the system, send a tree of layers. When updating the content or scrolling, just send a small delta to that tree. Fur…

How are you testing the mouse cursor following the window borders on resize? I've read that windows turns off the hardware sprite mouse cursor when resizing windows so that it can software render it to always line up properly.

Visual inspection for now. I've got an Arduino and a high-speed camera, so my plan for the next step is to send mouse and keyboard events from the Arduino, blinking an LED at the same time, then capture both the LED and the monitor in the video. Then a bit of image analysis. This is the only way to be quantitative and capture all the sources of latency.

Re: Desktop compositing latency is real

#199

I've been experimenting with this too, in the context of the Windows front-end for xi editor. It's absolutely true that the compositor adds a frame of latency, but I have a very different take than "turn it off." First, it's possible to design an app around the compositor. Instead of sending a frame to the system, send a tree of layers. When updating the content or scrolling, just send a small delta to that tree. Fur…

The issue with sending a tree of layers is that this prevents some important optimizations: avoiding overdraw with early Z becomes impossible, because your app doesn't know anything about the positions of the scrollable layers and so has to be conservative and paint all of their contents. So you trade a frame of latency for lots of overdraw, which is a tradeoff I'm not really comfortable making. (Note that today, alm…

It might be lots of overdraw in the general web case, but for a text editor almost everything the app renders is going to be shown on the screen. The exception is a bit of stuff just outside the scroll viewport, so it can respond instantly to scroll requests. This feels like a good tradeoff to me.

Re: Desktop compositing latency is real

#200

This article is about Windows, but I wonder how Wayland on Linux measures up.

Wayland does everything with compositing. The Wayland people love v-sync because they hate tearing. So chances are that this effect applies...

And then Gnome goes and builds on that by hooking the mouse pointer up to the redraw...
Post reply on HN