You are reading a single comment by @bq and its replies.
Click here to read the full conversation.
-
One simple change to image tags may fix it.
This didn't exist when you wrote the forum code, but it's well supported now.https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-loading
Depending on browser implementation this may also be clever enough not to load images you have skipped past (when jumping straight to a comment) unless you then scroll back up to those posts.
Would help in most cases.
But wouldn't help on that page as still too many far too large images were inlined.
What would help is a "only load images in view". But as you scrolled it would still blow the memory. Additionally this would break jumping to specific comments, as the height of comments above the one you jumped to isn't known and the act of jumping would start loading the images (and scroll the effective jumped to comment downwards as large things load above it).
There's no real solution that produces no edge cases, because it's always possible to inline a third party hosted image that is a 500MB jpg... there would be no way I could know, it would still blow things up.
If I tried to think about measures for things uploaded, then the best I would have is:
These things are all a bit crappy.
They prevent native mobile phone uploading of images (bike tag of bike would need post-processing to reduce image size).
They would prevent classifieds from just showing all of the images inline (lots more clicking to see what you're buying).
They would require JS for every page rather than supporting older devices (albeit with more RAM). Arguably login already does this, but I want to undo that and all JS-less browsing to function.
And it is an edge case... we have tens of thousands of classifieds threads with photos inlined, we have bike tag of bike, we have project threads... and this is the first time it has arisen.
That it's so rare an edge case and is going to be solved by time... the upgrade of devices with less RAM, the emergence of SOC CPUs with better RAM capabilities, etc... has me not feeling any urgency or priority to solve it.
It's a single page... it's viewable on desktops (assuming your computer is from the last 20 years)... and the impact to people browsing is very limited. Edge cases happen, but the only question is whether it's acceptable... for me it is, it's an edge case.
In the last 5 years the number of times that has been reported across almost 2B page views is once... that one page. That's well within my bounds of acceptable.