Live data from Hacker News

Desktop compositing latency is real

lofibucket.com

181–190 of 306 posts

Re: Desktop compositing latency is real

#181

Earlier quoted context omitted.

Not necessarily: video output is ultimately limited by the display. If the display runs at, say, 60Hz and both drawing on an off-screen buffer and compositing together take up less than ~16ms, the result should be exactly the same as drawing directly on the front buffer. The main problem is that modern GPU rendering is “pipelined”, so it's entirely possible to have a drawing operation that takes 16ms and a compositin…

This assumes you are synchronizing the updates with the monitor's refresh cycle, however if you aren't (and the major reason you see lag in compositors is because they do such synchronizations) then composition is indeed slower since it involves several more moving parts and the need to orchestrate the refresh of multiple windows (as opposed to the instant "i want to draw on the screen now" model that X11/Xorg withou…

Yeah, having to synchronize multiple windows is probably a pain. I guess that's a much smaller issue with a VR application (the OpenVR compositor supports overlays, but they're not used that often, and there's a clear priority to the "main" VR content)

I guess a valid approach would be to double buffer all windows on the compositor side, and render the "stale" buffer of any window that fails to update within a specified frame budget (16ms - expected compositing time), that way at least well behaved apps would have no noticeable latency. There would probably need to be some level of coordination with apps that already do their own double buffering, not sure how that's currently handled. Perhaps a hybrid approach between compositing and direct rendering is also possible, where different screen regions get composited at different frame rates. (Should work as long as there's no transparency involved)

Re: Desktop compositing latency is real

#182
post #136

My work laptop (the only Windows computer I use) runs Windows 7, and I intend to keep it that way as long as Windows 7 still gets updates. This article just confirms my bias, and I freely admit I am biased. I do not like Windows very much to begin with, but as far as Windows goes, I think Windows 7 ____ing nailed it (for people without touchscreens, anyway). On a related note, I have noticed that Outlook 2013 exhibit…

You maybe have that smooth typing animation enabled? It can be turned off via the registry, google for it.

Re: Desktop compositing latency is real

#183

Earlier quoted context omitted.

ethernet over multimode fiber, I want to be able to have accessories hundreds of meters away from my computer

Just make sure those cables are never bent beyond the minimum bend radius.

It's amazing how much you can bend fiber. Fiber is really hard to break just by bending it, assuming it is well insulated. You can have performance loss with bends and kinks though.

Re: Desktop compositing latency is real

#184
post #132

Earlier quoted context omitted.

The linked article explains it (TLDR: key travel time, scanning keyboard matrix, debouncing).

It’s a common myth that denouncing needs to meaningfully affect latency. It does not. It will affect maximum repeat rate, but you can pretty much report an event the moment you see an edge.

[deleted]

Re: Desktop compositing latency is real

#185
post #136

My work laptop (the only Windows computer I use) runs Windows 7, and I intend to keep it that way as long as Windows 7 still gets updates. This article just confirms my bias, and I freely admit I am biased. I do not like Windows very much to begin with, but as far as Windows goes, I think Windows 7 ____ing nailed it (for people without touchscreens, anyway). On a related note, I have noticed that Outlook 2013 exhibit…

The difference in latency is only noticeable in Windows 7 with DWM disabled though, is that your current setting?

Re: Desktop compositing latency is real

#186
post #99

Earlier quoted context omitted.

That's an affiliate link fwiw

Why do people care about affiliate links? Serious question.

I pointed it out, and I don't really care exactly--I just think it's common courtesy for the person to disclose it.

He didn't, so I did for him.

Re: Desktop compositing latency is real

#187
post #173

> Virtual keypresses were sent with WinAPIs SendInput and pixels copied off screen with BitBlt. This methodology alone could account for the differences in timing between Win7 and Win10. For all we know, Win10 could just be slower at getting the pixels back to the program from BitBlt, or SendInput could be slower triggering events, or a multitude of other issues. The best way to truly detect key-to-photon latency is…

As I understand it: - Compositing is done on the GPU - BitBlt is done on the CPU - Copies from GPU -> CPU are slow So, yeah, compositing adds a frame of VSync latency, but these measurements are complete bunkum.

BitBlt is done in DMA ram by the CPU, so it may be even worse than just a copy as there is likely a wait involved too to prevent shared access. Using DMA ram prohibits the GPU/Driver from doing optimizations on that ram that it could do if the buffer was in dedicated gpu-ram. This is why DX12 resources are generally always copied into non-shared buffers.

Re: Desktop compositing latency is real

#188
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…

Once you throw in another 15+ms of keyboard and USB latency...

Re: Desktop compositing latency is real

#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.

Re: Desktop compositing latency is real

#190
post #119

Earlier quoted context omitted.

this reminds me of the argument that instead of going to USB C 3.1 as the grand unifying connector for all peripherals (including video), we should have instead migrated to Ethernet cables for everything.

Actually not a bad idea. Ethernet speed is one gigabit per second. And there are high throughput devices like LIDARs (eg Velodyne LiDAR known from Google/Waymo self-driving cars) that are connected via Ethernet rather than USB. Having 1 GBit Ethernet LAN network since 2004, I would prefer the possibility to upgrade to 10Gbit home Ethernet in near future.

It's a terrible idea. USB-3 is faster than 1Gbit/s. and there's no way you can drive a 5K monitor with any current or near future Ethernet standard, the bandwidth demands are too punishing.

Ethernet isn't optimized around short-haul signals, like computer to screen over a few metres at most, it's for 100m+ runs in datacentres. The signals have to be a lot more durable.

Post reply on HN