twobin/react-lazyload

Lazy Load within IFrames introduces a severe scroll lag

Beyondem opened this issue · 0 comments

My react app is an ecommerce shop, with hundreds of products.
Adding react-lazyload has been a huge help in speeding up the overall page, and it works beautifully.

By design, this shop gets embedded on webpages via iframes. This is where the problem begins. It seems the offset no longer applies, where things only begin loading when they are actually in view. In addition, the scroll lag is absolutely horrible and unusable now. Its like the scroll/resize listeners are running continuously and not working correctly (Still trying to debug via devtools to see what the specific problem may be).

I have found one similar issue, however theirs relates to elements not loading at all, which is not the case in my scenario.
#164

Hoping someone can help point me in the right direction as to what may be causing this, and how I can go about resolving it.

Thank you!