Skip to main content
Blastoise186
Helper ⭐️⭐️⭐️
March 23, 2021
New Idea

Implement lazy loading for images

  • March 23, 2021
  • 12 replies
  • 185 views

Hi,

I’ve been recently thinking about ways to improve platform performance, and a recent thread reminded me about this idea which I forgot to post previously. 

For my own websites that I run, I make heavy use of the server level caching and optimization features to massively improve performance across the entire stack, one of which is lazy loading images and media. It helps to improve page loads by only initially loading in resources that are actually visible when the user first lands on the page, and then load in other resources when they’re about to become visible on a Just-in-Time basis. This helps to ensure I’m not dumping 50mb worth of media gallery all at once onto a user who only wants to view two or three images. It also reduces the pressure on both sides and breaks things down into much smaller chunks.

I feel it’s something that inSided might benefit from, especially for media heavy threads, or for ones where there’s almost no images in the opening post, but loads of images five replies deep. These currently bog down page loads even if the user isn’t going to see everything. If it was lazy loaded, the page could be snappy and lightning fast, without losing anything else.

Ideally, it would be great for responsive placeholders and transition effects to be applied as well, so that the layout of the page doesn’t suddenly jump all over the place when an image loads in and renders. It could also look really nice too, if you do it right!

12 replies

Blastoise186
Helper ⭐️⭐️⭐️
April 6, 2021

No worries @Marion Frecaut ! :)

The PoC overall seems to be working pretty well, aside from those potential snags. It has also allowed me to uncover a few other potential improvements as well.

What I can say though, is that with the PoC enabled, a totally fresh load of the homepage takes roughly five minutes to fully load in on my “chaos engineering” test where I simulate some of the most horrible network conditions possible via my network controller - 2001 broadband speeds with 128kbps download. Still takes around three or four minutes to load anything useful at all, but much better than eight minutes previously.

Doing the throttling via my network controller is more realistic than using Chrome DevTools, since it forces everything that goes through my router to be at the reduced speeds, not just that one tab.

Turning off the throttling and going full speed (8 meg down, 2 meg up) makes things a little faster now than they were last week. It’s not quite as noticeable for repeated page loads, but the first hit really benefits. In some cases, I’m seeing a 20% benefit so far, but mainly 10% average is more common for me.

Bug blasting absolutely everything... The Blastoise Way
Helper ⭐️⭐️⭐️
April 7, 2021
Updated idea status New → Open