lazy vs eager loading: why your phone downloads videos you'll never watch
Stacks · 12 min read · posted Nov 21, 2026, 8:13 pm
Every app has to decide when to load its data. Eager loading fetches it up front, before you've asked for anything. Lazy loading waits until the moment you need it. Almost every app you use runs a mix of the two, and the mix is where the engineering is.
This is the longer version of my video. It covers what each approach costs, the hybrid real apps land on, and the loading decisions inside Oynk, my startup's app, with numbers pulled from the code.
the one decision
A feed lives on a server. A phone wants to show it.
SERVER PHONE
+--------+ +--------+
| post 1 | | |
| post 2 | when? | empty |
| post 3 | -----> | screen |
| ... | | |
| post n | | |
+--------+ +--------+
The question is never whether to load the data. It's when. Loading has a price: the wait, the mobile data, the memory to hold whatever arrived, and the battery spent fetching it. Each strategy below is a different answer to who pays that and at what moment.
eager loading
Eager loading fetches everything at the start, in one go.
tap
|-- wait -----------+
v
everything lands
scrolling: instant
When it's right. The data is small and it has an end. Think a settings screen, or a list of 200 places as plain text. You're also close to certain the person will use most of it. After the one wait, sorting and filtering run on data the phone already holds, so nothing after that needs the network.
What it costs. The first screen waits for the last item. Whatever the person never scrolls to was downloaded for nothing, and the copy on the phone starts going stale the moment it lands.
It also stops working past a certain size. In the video I say you can't load 2,000 reels and call it a day. A short video runs to a few megabytes, so that's gigabytes of data for a feed you were going to close in a few minutes.
lazy loading
Lazy loading fetches nothing until it's needed. The first screen gets what's on it. Everything else waits for a scroll or a tap.
tap
|- first screen (fast)
|
scroll -- wait -- next
scroll -- wait -- next
When it's right. The list is huge or has no end. Each item is heavy, like a photo or a video. Or it's a screen most people never open, like a paywall or a details page.
Where it stalls. In a few places, and they're all worth knowing by sight.
The wait moves to a worse moment. Eager makes you wait once at the start, when you expect it. Lazy makes you wait right after you tapped something you wanted.
Fast scrolling outruns it. Each row starts loading when it appears, so a hard flick puts your thumb ahead of the network and you get a column of grey boxes.
It gets chatty. This one has a name, the N+1 problem. You load a list of 50 businesses in one request, then every row lazily asks for its own photos. That's 51 requests where one would do, and on a phone each one pays for its own round trip. The fix is to eager load the related data inside the first query.
On the web, lazy loading an image is one attribute:
<img src="photo.jpg"
loading="lazy"
width="800"
height="600">
The browser holds off downloading until the image is near the screen. The six small badges at the bottom of this page are marked that way, so if you haven't scrolled down there, your browser most likely hasn't fetched them. The width and height let it reserve the space, which stops the page jumping when the image lands.
the hybrid real apps use
Nobody ships pure eager or pure lazy. Real apps split the job into pieces.
Build only what's on screen. A long list doesn't create every row. It creates the ones near the screen as you scroll. SwiftUI calls this a LazyVStack and Jetpack Compose calls it a LazyColumn.
Fetch in pages. Ask the server for 20 items at a time, not the whole list. There are two ways to ask:
offset: skip 40, give me 20
cursor: give me 20 after #8f3a
Offset is simple and it breaks on a live feed. If new posts land at the top while you're reading, everything shifts down and the next page repeats items you've seen. A cursor points at an exact item, so it doesn't care what got added above it. Endless feeds use cursors.
Prefetch a window. Stay a few items ahead of the person. This is the part that makes lazy feel like eager.
reel 4 watched
reel 5 watched
> reel 6 ON SCREEN
reel 7 loaded, waiting
reel 8 loaded, waiting
reel 9 not loaded
reel 10 not loaded
The size of the window is a bet. A bigger one is smoother and wastes more downloads. A smaller one saves data and shows more loading states. Good implementations give prefetch a lower priority than whatever is on screen, and they stop prefetching when the phone is struggling.
Meta has described this for its Android apps, in a post on the Android Developers Blog from March 2026. Instagram Reels uses what the post calls an "adjacent preload" strategy: the videos next to the current reel are kept ready in memory, so a swipe up or down plays instantly. It gives no count, which is why I say "the next few" in the video. Facebook's feed runs on the same system with a different setting. It preloads only the video coming into view, because there can be many posts with no video in between. Both apps pause preloading when the device is under heavy load.
So the hook in the video is literal. Close Instagram mid-scroll and the reels it had ready are data you paid for and never watched.
Reels can afford a window because the next move is easy to guess. You can only go to the next reel or the previous one. A bet with two outcomes is cheap to cover.
Show a placeholder for the wait you couldn't avoid. A spinner says something is happening and nothing more. A skeleton, the grey outline of the content, shows the shape of what's coming and holds its space so the screen doesn't jump. A blurred preview goes one step further. BlurHash, an open source format, squeezes a photo down to a short string of text that decodes into a blurry version of it, small enough to send with the rest of the data. None of these make anything load faster. They make the wait read as progress.
Keep the last copy. Show what you had last time straight away and fetch the fresh version behind it. When that arrives, swap it in. The web calls this stale-while-revalidate.
how i applied it in oynk
Oynk is my startup's app. It lists deals at local businesses in Auckland: a bit over 200 of them as I write this, with about 1,000 photos between them. Everything below is how the iOS app on the App Store (version 1.5.0) behaves.
The text is eager. At launch the app makes one request for the whole catalogue. That's every business's name, category, deal, rating and location, plus the web addresses of its photos. Each business's offers, photo list, opening hours and tags are embedded in the same query, which is the N+1 fix from earlier.
I measured that request while writing this: the full catalogue is 146 KB compressed. That's about the weight of four photos at the size a card shows them.
Because the phone holds the whole list, every row on the home screen is built from that one response, including the featured row and the one that changes with the time of day. Sorting and category filters never touch the network.
The request starts while the launch animation is still playing, so the feed is usually there when it ends. The app also keeps the last catalogue on the phone. A cold launch draws that copy first and replaces it when the fresh one lands.
The photos are lazy, with a window. A thousand photos is not something to download up front. At roughly 40 KB each after resizing, that's about 40 MB to open the home screen.
So a photo loads when its card gets near the screen, with prefetch on top:
- When the catalogue lands, the app warms the photos for the rows at the top of home and for the first 20 cards of the main list.
- Change a filter or run a search, and the first 12 results get the same treatment.
- From there, each card that scrolls into view warms the next 8 below it. That's about three screens of cards.
The app remembers how far down it has warmed. Scrolling back up costs nothing, and jumping deep into the list warms the part you landed on, not everything you skipped.
Prefetch downloads run at a lower priority than photos for cards on screen. If a card appears while its photo is still mid-prefetch, it joins that download and doesn't start a second one.
Photos get resized before they're sent. They're uploaded at whatever size they come in, often a full size image. The app asks the image server for a 720 pixel wide WebP. One 346 KB upload measured 40 KB that way. The deal page asks for a larger version, about 100 KB, because it fills the width of the screen.
Placeholders are blurred previews. Every gallery photo has a BlurHash stored next to it, 28 characters long. Those strings ride along in the eager catalogue request, so the placeholder for a photo is on the phone before the photo is asked for. An image without a hash, like a logo, gets a grey shimmer.
The deal page is lazy. The catalogue leaves out descriptions. A business's description and contact details are fetched when you tap its card, then the rest of that page (full offers, gallery, locations) loads in parallel. You'll open a few of those pages in a session, not 200. Once the gallery list arrives, the app prefetches those photos at the larger size so swiping through them doesn't stall mid-swipe.
Heavy setup waits its turn. The analytics SDK starts after the first frame is on screen, and only if you agreed to analytics. Membership prices are fetched from the App Store the first time the paywall opens, not at launch.
The map is the one that was wrong first. It started fully lazy, with nothing built until you tapped the Map tab. The first time anyone does that, Apple's MapKit has to start its whole engine, and it does that on the main thread, so the first switch to the map stalled. The fix was to stop being lazy about the engine. One second after the tab bar appears, while nothing else is moving, the app builds a map off screen and keeps it. The pins are still lazy and load when you open the tab. Lazy for the data, eager for the engine.
Favourites starts on a skeleton. That screen asks two questions in a row: which deals did you save, then what are they. Until the first answer is back, an empty list could mean "no favourites" or "not loaded yet". An early build flashed "No favourites yet" for a frame, then placeholders, then the cards. Now it shows up to three skeleton cards until it knows. The first six photos are warmed before the real cards swap in.
One wait is on purpose. The first time home opens, it holds its skeleton for half a second even when the data is already there. Landing straight on a full screen read as a pop. In the video I ask how little loading we can get away with showing. Here the answer wasn't zero.
The whole app on one card:
EAGER
catalogue text
blurhash strings
map engine (1s after launch)
PREFETCHED
photos, 8 cards ahead
deal page gallery
LAZY
descriptions, full offers
map pins
membership prices
analytics sdk
a rule of thumb per screen
Four questions, asked for each screen and each kind of data on it.
- Is it small, and does it end? A bounded list of text can go eager. Mine was 146 KB for the lot. A feed with no end needs pages.
- How heavy is one item? Text is cheap and media isn't, so split them. Words up front, photos and video on demand.
- Can you guess what's next? In a vertical feed the next item is the next item, so prefetch a small window. On a screen with 200 doors you can't guess. Stay lazy and put the effort into the placeholder.
- Who pays when the guess is wrong? Usually someone on mobile data. Be generous prefetching small things and stingy with big ones.
The short version: eager for what's small and certain, lazy for everything else. The exception is anything heavy that you can predict. Prefetch that, a few items at a time.
If an AI agent wrote your app, ask it to audit this. Something like:
go through every screen in this
app. for each one, tell me what
data it loads, when it loads it,
and what the user sees while it
loads. flag any list that
fetches everything at once and
any image with no placeholder.
The design side of Oynk is in the Figma MCP guide.
what i'd word differently in the video
A minute of video rounds things off. Five places where the careful version is different.
I said "eager fetching". The standard name is eager loading. Prefetching is the related word, for loading something ahead of time because you expect it to be needed.
I said lazy loading gives you "increased device performance". It doesn't make the phone faster. You get a quicker first screen, and the phone uses less data and memory because it's holding less.
"How little can we show" should have been "how little can we load". Showing is the part we want to keep.
The counters in the animation, 3.8 seconds for eager and 0.3 for lazy, are illustrative. I didn't measure them. The real gap depends on how much you load and on your connection.
The Instagram line comes from a post about Meta's Android apps, and that post gives no number. "The next few" is as specific as the source lets me be. I'd expect the iPhone app to do the same, but the post doesn't cover it.
honest limitations
Prefetching spends other people's data. Every photo Oynk warms that you never scroll to came out of your mobile plan. The app doesn't check if you're on wifi or mobile data, and it ignores Low Data Mode. It should check both.
I don't measure the hit rate either. The window is 8 cards, and I can't tell you how many of those photos get looked at. So I don't know if 8 is right or only comfortable.
The eager catalogue has an expiry date. One request for everything works at 200 businesses. At 20,000 it would be megabytes on every launch, and it would need pages or a query limited to what's near you.
A saved copy can be wrong. Drawing last time's catalogue first means a deal that ended an hour ago can sit on screen for a moment before the fresh copy replaces it.
Skeletons and blurred previews change how a wait feels and nothing else. A three second request still takes three seconds.
Every feed that never stalls has a number like 8 in it somewhere. You're the one paying for it.