toddmotto / echo

Lazy-loading images with data-* attributes

Home Page:http://toddmotto.com/labs/echo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove the use of getBoundingClientRect

thegiantbeast opened this issue · comments

Hi,

I saw this project and it seems that it uses getBoundingClientRect for checking the current visible area but it triggers a repaint, which in a large scale app this won't work very well.

Check out http://gent.ilcore.com/2011/03/how-not-to-trigger-layout-in-webkit.html

If you can provide some perf comparisons then feel free to send a pull request with changes and I'll reopen issue.

Did you even read the link that I've sent?

If you search for it you'll see more links like these:
http://www.html5rocks.com/en/tutorials/speed/unnecessary-paints/
http://www.html5rocks.com/en/tutorials/speed/scrolling/

Still I'll do a pull request for it.

I did but it had no comparisons or data that makes it a useful resource.

I also ran a timeline on Echo.js and couldn't see any repainting that would cause any performance issues.