Menu

1 / 3

Your Flutter App Is Not Slow. It Is Loading Full Size Images Into Tiny Boxes.

DEV Community: dart·Sohail Khan·11 days ago
#fW0lkW1U
#devtodart#devto#dev#list#every
Reading 0:00
15s threshold

A product list I reviewed scrolled badly on older phones. Every card showed a small thumbnail, but the app downloaded the full size photo for every item, held it in memory, and resized it on the fly.

The list was not slow because the phones were weak. It was slow because every row asked the phone to do heavy work for a 120 pixel box, and to do it again on every scroll.

The wrong fix

The wrong fix is to blame the phone or to lower the quality of every image.

Older phones are not the problem. The app is asking them to do work the server already did once, for every row, on every scroll. Lowering the quality of every image hurts the detail view too, where the user actually wants the full photo, and it still leaves the real problem in place: the list is fetching far more image than it shows.

A phone can show a small thumbnail beautifully.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.