RORK LABJP
TOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the roundTOOLING — Rork's developer repos keep moving: rork-xcode was updated on July 16, rork-device on July 15, and rork-plist on July 13OPUS46 — Claude Opus 4.6 is live in Rork, and Rork Max is built to assemble apps on top of Claude CodeSIM — A cloud iOS simulator runs in the browser, with one click to install on a device and two clicks to publish to the App StoreMAX — Rork Max emits pure Swift rather than React Native, reaching iPhone, iPad, Apple Watch, Apple TV, Vision Pro, and even iMessageNATIVE — That opens up HealthKit, ARKit and LiDAR, NFC, Dynamic Island, Live Activities, 3D through Metal, and on-device inference with Core MLSEED — Rork raised a $15M seed led by Left Lane Capital, with Peak XV and a16z Speedrun joining the round
Articles/App Dev
App Dev/2026-05-30Intermediate

Killing Thumbnail Scroll Jank in an iOS Wallpaper App — Notes on ImageIO Downsampling

Lay out a lot of thumbnails and scrolling stutters while memory balloons. The culprit was full-size image decoding on the main thread. Here is how ImageIO downsampling and prefetching cut measured memory dramatically.

iOS109Swift48Performance23UICollectionViewImageIO

Premium Article

Scrolling stalls the moment thumbnails appear

I have been building apps on my own since 2014, and my wallpaper apps have now passed 50 million downloads in total. When you run something for that long, early code inevitably survives in a corner somewhere. That is exactly where this problem was hiding.

On the thumbnail grid, once the image count passed a few dozen, scrolling visibly stuttered. The inertial scroll after lifting your finger snagged in small jerks, and on some devices it even triggered memory warnings. Measuring on a real device, simply opening the grid once pushed the app's memory use up to about 480MB. Wallpapers are large by nature, so I expected some cost — but not that much just to show thumbnails. Something was clearly wrong.

The cause was full-size decoding on the main thread

Tracing the code, two problems were stacked on top of each other.

The first was decoding images synchronously inside cellForItemAt. UIImage(contentsOfFile:) looks lightweight, but the actual expansion into pixels (decoding) happens at draw time. So every time scrolling surfaced a new cell, a heavy decode ran on the main thread. That was the direct cause of the dropped frames.

The second was loading full-size images even though these were thumbnails. The display area was maybe 200 points per side, yet the original images — several thousand pixels across — were being expanded into memory in full. A decoded bitmap costs roughly "width × height × 4 bytes," so holding several large ones balloons into hundreds of megabytes fast. That was the source of the memory growth.

Official samples lean on UIImage(named:) and contentsOfFile: constantly, but in a grid that handles many images at once, this approach falls apart. You have to shrink to the size you actually need at the moment you load.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Why decoding synchronously inside cellForItemAt chokes scrolling, explained alongside memory
The actual downsampling code using CGImageSourceCreateThumbnailAtIndex and what each option means
The full setup I run in production: prefetching, NSCache, and cancellation on cell reuse
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

App Dev2026-07-03
Making Your Rork Max App Resilient to Dropped and Restored Connections: Offline Detection and Retry with NWPathMonitor
Build networking that survives a lost signal in your Rork Max native Swift app with NWPathMonitor. Detect offline states, respect Low Data Mode and cellular, and auto-resend queued work on reconnect — all with working Swift code.
App Dev2026-07-03
Keeping Downloads Alive After Your Rork Max App Is Killed: Background URLSession Design and Relaunch Handling
How to design downloads in a Rork Max native Swift app so transfers continue in the OS daemon even after the app is suspended or terminated. Covers relaunch wiring, resumeData recovery, and measured isDiscretionary behavior with working code.
App Dev2026-06-16
Staging Wallpaper Packs Before the First Launch: Where Rork Max and Background Assets Fit
Content-heavy apps tend to greet new users with an empty grid. Background Assets downloads content out-of-band, ahead of the first launch. Here is how I implement it in Rork Max's native Swift, a domain Rork (Expo) cannot reach easily, plus how I decide when it is worth it.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →