W3C home > Mailing lists > Public > www-style@w3.org > June 2013

Re: lazy loading for images via css

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 28 Jun 2013 13:01:13 +0200
To: Felipe Nascimento de Moura <felipenmoura@gmail.com>
Cc: www-style <www-style@w3.org>
Message-ID: <2rqqs8t6tb383ufbgbhuatsosli7fd4860@hive.bjoern.hoehrmann.de>
* Felipe Nascimento de Moura wrote:
>I mean, nowadays websites use it to avoid unnecessary image loadings...but
>they sacrifice(a lot of) the performance! It's a javascript running for
>each scroll event, usually running through all the images in a loop to see
>which ones are in the current visible viewport! (it is terrible or is it
>just me?!)

That certainly would be terrible if so, but I do note that this could be
optimised considerably easily. For instance, a Quadtree could be used to
limit the number of images in the inner loop.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Friday, 28 June 2013 11:01:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:31 UTC