If you're not looking, I'm not loading



  • I saw an old post talk about an HTML5 version of Angry Birds, so I opened it to see what it looks like.

    1. Open http://chrome.angrybirds.com/ in Chrome
    2. Look at the loading bar on the bottom, then change tabs.
    3. Wait a few seconds
    4. Go back to Angry Birds' tab, and you'll see the loading bar start to move from the exact same it was on when you left the tab. WTF?

    Note 1: It's actually loading, but not updating the progress bar for some reason.

    Note 2: 5. ??? 6. Profit!



  • All browsers do that. It's an optimization-- translating DOM updates into screen updates is expensive, so you don't do it unless you need to. Imagine how much bitching you'd do if it continued updating for stuff you couldn't even see, and drained your laptop battery.

    What used to annoy me is that IE has the same optimization, even though shows a little thumbnail in the taskbar. So if I'm uploading a large YouTube video, I mouse-over the thumbnail to see the upload percentage and-- I see whatever the percentage was back when I minimized it. Ugh. FF and Chrome probably do the same thing, I just don't use them for uploading to YouTube.



  • @blakeyrat said:

    All browsers do that. It's an optimization-- translating DOM updates into screen updates is expensive, so you don't do it unless you need to. Imagine how much bitching you'd do if it continued updating for stuff you couldn't even see, and drained your laptop battery.

    What used to annoy me is that IE has the same optimization, even though shows a little thumbnail in the taskbar. So if I'm uploading a large YouTube video, I mouse-over the thumbnail to see the upload percentage and-- I see whatever the percentage was back when I minimized it. Ugh. FF and Chrome probably do the same thing, I just don't use them for uploading to YouTube.

    I'd say this is a WindowsTF. Hovering the taskbar should tell the program "hey, you're visible", not "yeah, you're not being viewed" and then showing an old screenshot.


  • @Ben L. said:

    Hovering the taskbar should tell the program "hey, you're visible", not "yeah, you're not being viewed" and then showing an old screenshot.

    It does, unless it's overridden by the browser so it can unload the DOM and show the last thing seen on the screen.

    @blakeyrat said:

    translating DOM updates into screen updates is expensive, so you don't do it unless you need to.

    If I change tabs at 13%, when I come back it then continues to count up from 14%. Why not jump to whatever percentage it should show? Because it needs to do the animation, and that, for some reason, is stuck when you're off-tab.



  • @blakeyrat said:

    All browsers do that. It's an optimization-- translating DOM updates into screen updates is expensive, so you don't do it unless you need to. Imagine how much bitching you'd do if it continued updating for stuff you couldn't even see, and drained your laptop battery.
     

    Is this for the on-page loading bar or the browser's? I can't test because the angrybirds url crashes my Chrome.

    @blakeyrat said:

    What used to annoy me is that IE has the same optimization, even though shows a little thumbnail in the taskbar. So if I'm uploading a large YouTube video, I mouse-over the thumbnail to see the upload percentage and-- I see whatever the percentage was back when I minimized it.
     

    Yeah, it's annoying to have a livethumb not being, heh, live, but that's nothing to do with the browser, but with Windows deciding to not live-update the taskbar thumbnail if the window was minimized.



  • @dhromed said:

    @blakeyrat said:
    What used to annoy me is that IE has the same optimization, even though shows a little thumbnail in the taskbar. So if I'm uploading a large YouTube video, I mouse-over the thumbnail to see the upload percentage and-- I see whatever the percentage was back when I minimized it.
     

    Yeah, it's annoying to have a livethumb not being, heh, live, but that's nothing to do with the browser, but with Windows deciding to not live-update the taskbar thumbnail if the window was minimized.

    Turns out that's because a minimized window has no client area (to speak of), so there's nothing to update from.  You may have seen this effect on some versions of windows when explorer crashes or is terminated and you minimize an existing window, it shrinks down to a small rectangle that's basically nothing but a chunk of title bar with the restore/maximize/close widgets visible.  Not repainting client area that can't be seen is an obvious enough optimisation. CPUs are faster now than when that design decision was made of course, but having to send a paint message to a minimized app might introduce a significant delay in drawing the thumbnail, particularly if the app has been substantially paged out.  And I'm sure mobile users appreciate their battery not being wasted on updating the minimized window of a media player 30 times a second.

    (Link via the blog referred to in the stackoverflow post linked in the other thread about games in full-screen mode.)



  • Raymond Chen recently talked about this:

    • By default, Windows 7 returns a cached picture (optimization).
    • You can override it to draw the picture everytime the taskbar (and Aero Peek) requests it.
    • Browsers don't because they like to unload the DOM of tabs they're not displaying.



  • @dhromed said:

    Is this for the on-page loading bar or the browser's?

    I assume he meant something on the page, but I'm too lazy to check myself.

    @dhromed said:

    Yeah, it's annoying to have a livethumb not being, heh, live, but that's nothing to do with the browser, but with Windows deciding to not live-update the taskbar thumbnail if the window was minimized.

    Nah, app controls that 100% of the time. (Raymond Chen actually wrote a blog post on how to implement that recently). If IE wanted it to update while a window minimized or in a hidden tab, they easily could. They don't because they'd have to remove the "don't update the DOM for non-visible window" optimization and I'm sure they figured that's not worth removing.



  • @blakeyrat said:

    Nah, app controls that 100% of the time. (Raymond Chen actually wrote a blog post on how to implement that recently). If IE wanted it to update while a window minimized or in a hidden tab, they easily could. They don't because they'd have to remove the "don't update the DOM for non-visible window" optimization and I'm sure they figured that's not worth removing.

    This is exactly my point: Windows is displaying a window, and at the same time, telling it that it's not visible.



  • No; you are missing the point. The point is that what gets displayed in the preview is 100% controlled by the app at all times. Windows only displays the shrunk window by default. You'll note some apps display other stuff- IIRC Live Messenger shows the avatar.

    So not updating the preview is a conscious choice someone on the IE team made.



  • @dhromed said:

    Is this for the on-page loading bar or the browser's?

    Of course it's in the page. What browser has a loading progress bar?

    @dhromed said:

    the angrybirds url crashes my Chrome

    That's a real WTF. The url only works on Chrome.



  • @configurator said:

    What browser has a loading progress bar?
     

    Netscape used to.

    I don't use IE but I've seen Windows Explorer use the address bar as a progress bar (because it's so sodding slow) so presume it may do that in an internet browser also. I've also a suspicion that Opera did something similar some time back.



  • @Cassidy said:

    Netscape used to.


    I was talking about this century :)



  • @Cassidy said:

    I've also a suspicion that Opera did something similar some time back.
    It still does.



  • @configurator said:

    Of course it's in the page. What browser has a loading progress bar?
     

    Opera had this big blinkenlights loading thing, last time I ran it.

    Funny, I don't remember the moment browsers dropped their progress bars. Now it's all spinners.



  • @dhromed said:

    Funny, I don't remember the moment browsers dropped their progress bars. Now it's all spinners.

    Conspiracy! Next thing you know webpages will be fluoridated.



  • @blakeyrat said:

    @dhromed said:
    Funny, I don't remember the moment browsers dropped their progress bars. Now it's all spinners.

    Conspiracy! Next thing you know webpages will be fluoridated.

    Or iodized.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.