https://bugzilla.wikimedia.org/show_bug.cgi?id=34023
--- Comment #5 from Daniel Friesen <[email protected]> 2012-01-30 01:50:37 UTC --- *sigh* please keep in mind how a browser works. - The browser starts downloading the HTML and does partial rendering as it downloads - As it finds scripts and images it starts to download them in parallel -- As images finish downloading the browser incorporates them into the rendered page -- Scripts are executed in order, blocking the rendering of things after them and naturally waiting for src="" based scripts to be downloaded. - domready is fired after the browser has finished downloading and parsing the HTML in the initial request. - Also in the case of ResourceLoader we initiate the downloading of a script inside a script, so the http requests for scripts also don't even start until the entire initial request has been downloaded and all the other <script> tags in the page have also been downloaded and executed. So here's what changes: - In a normal request the browser will start downloading images as soon as it sees the <img> tag and render them into the page while it's still downloading the page (with the first images in the page likely ending up ready to view along with the content while the browser is still working). - In a lazy request the <img> will have a placeholder, the browser will download all the scripts on the page and execute them, after the entire page has been downloaded and parsed and the other scripts have been executed it'll then execute the RL script and begin downloading our RL modules including the lazyload code, the lazyload code will then run and THEN after all that the browser will begin downloading the images at the start of the page. This means that on a long page lazy loading images at the JS level will delay the loading of the first images on the page and instead of being able to see the image while things like the sidebar haven't even shown up yet the image will not show up until EVERYTHING else has been downloaded. Try using Sloppy (http://www.dallaway.com/sloppy/) to simulate an EDGE connection and see what happens when you view the lazyload disabled and enabled demos using it to simulate a slow connection. Which actually brings up another point. Actually testing with sloppy myself shows me that not only does it slow down the loading but it also destroys the browser's native ability to progressively render a partially downloaded image ruining the user's experience even more. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
