Why is changing displays slow?

6

1

I've had many laptops over the course of many years, and while many things have sped up, one thing remains as slow today as it was years ago: (dis)connecting an external display. What's taking it so long to detect the new display and update the pixel buffers? I use Macs primarily, but I think this is equally slow on other platforms.

Josh Bronson

Posted 2010-05-19T17:49:30.857

Reputation: 169

1Perhaps not exactly programming related, but nice question :-) – None – 2010-05-19T17:52:31.410

Doesn't sound like a programming question? Might be better asked on the sister site superuser.com or serverfault.com. – Eric J. – 2010-05-19T17:52:55.747

1I've never noticed it to be slow on DOS/Windows/Linux platforms. Maybe it's just a Mac thing? I don't think I've ever done an external display on a Mac laptop. – Brian Knoblauch – 2010-05-19T18:13:56.067

Certainly an interesting question. I agree that it should take way less than a second but it really takes about a second or so. It is notably faster on Windows, though. – bastibe – 2010-05-30T21:44:56.973

Answers

1

I certainly don't know the answer, but I'm reminded of something I read in Owen Taylor's Boot Poster Challenge:

... the natural latency of external systems - the time it takes a monitor to respond to a DDC probe ...

DDC seems to be an I2C-based system, so 100kbps on the wire, but also whatever MCU/EEPROM they've got on the other end of it. Plus maybe the graphics card doesn't even assume there's a DDC bus there to be probed, so it does some hardware probing first to make sure it looks sane before trying to chat.

Beyond that, I can guess...

It could also be a social/economic reason: nobody ever tests or advertises start-up time for displays. I doubt there are many display engineers sitting around saying "we should make the DDC probe (or whatever the bottleneck is) faster!". Since no tech reviewer ever mentions it, and no review site lists it, it's not big bang for their buck.

And the prime use case for displays might not even be plugging in laptops. If they think it's turning on your PC at the start of the day (I don't know if it's true or not, but if they think it is), then the time it takes to get to a useful screen is going to be dominated by the OS booting, the backlight getting up to brightness, etc.

Finally, software in embedded systems tends to be really awful. Have you tried using the on-screen display on an LCD recently? That's the same system. :-)

Of course, for unplugging the display, I have no idea. You think it'd be faster, but it really isn't. Maybe they do a whole "probe all displays when anything changes", though I don't know why that should be necessary.

user37944

Posted 2010-05-19T17:49:30.857

Reputation:

0

That's a great question.

Obviously, this is OS dependent.

Much of the time goes to recalculating the sizes and locations of all the windows, and then repainting them, which triggers a whole chain of repaints down to their smaller components. Fonts and other things may need to be reloaded or rescaled as well.

Uri

Posted 2010-05-19T17:49:30.857

Reputation: 101

Repainting is certainly not the problem here. Repainting all windows happens all the time and is not time consuming at all. For example, closing a maximized window on Win XP (no desktop compositing) will redraw all windows and it happens in a snap. – bastibe – 2010-05-30T21:43:09.707