◉RORK LABJP
●ARCHIVE — Since 11/22 you can archive a Rork project instead of deleting it, and bring it back from Archived●PLAY FIX — Fixed: Expo apps built for Google Play losing their Rork AI key, which broke AI features●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 7 days left. Check which model your app calls●SPLASH — Expo users report apps stuck on the splash screen after rolling back to an earlier update●NEW — New: Three clues to check before replying to a "stuck on the splash screen" review●2.5 ROUTE — From 12/1, Gemini 2.5 requests reroute to newer models at new rates. 8 days left●ARCHIVE — Since 11/22 you can archive a Rork project instead of deleting it, and bring it back from Archived●PLAY FIX — Fixed: Expo apps built for Google Play losing their Rork AI key, which broke AI features●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 7 days left. Check which model your app calls●SPLASH — Expo users report apps stuck on the splash screen after rolling back to an earlier update●NEW — New: Three clues to check before replying to a "stuck on the splash screen" review●2.5 ROUTE — From 12/1, Gemini 2.5 requests reroute to newer models at new rates. 8 days left
Articles/Dev Tools
⬡ Dev Tools/2026-06-24Advanced

Fixing Stutter When a Rork Max SwiftUI Image Grid Scrolls

Measure why a Rork Max SwiftUI image grid stutters while scrolling, then fix it with ImageIO downsampling, off-main-thread decoding, and stable cells to cut real-device hitches.

Rork Max236SwiftUI66Performance25Image ProcessingLazyVGrid

✦ Premium Article

Ask Rork Max to "build a grid screen that shows wallpapers" and you get working SwiftUI in a few minutes. It looks smooth in the simulator. Then you put it on a real device, scroll through a few dozen 4K wallpapers, and the scroll stops keeping up with your finger. As an indie developer running the wallpaper app Beautiful HD Wallpapers, I hit exactly this when I rebuilt its grid with Rork Max.

The cause isn't sloppy generation. The generated code takes the straightforward path of "just display the image," which is correct while the sample images are small. The problem is that the real images your app ships are far larger than what the generator assumed. Let's walk through where to start fixing the naive version so that real-device scrolling comes back — measuring as we go.

Why the freshly generated grid stutters on device

The grid Rork Max hands you first usually looks like this.

struct WallpaperGrid: View {
    let items: [Wallpaper]
    private let columns = [GridItem(.adaptive(minimum: 110), spacing: 2)]
 
    var body: some View {
        ScrollView {
            LazyVGrid(columns: columns, spacing: 2) {
                ForEach(items) { item in
                    // The common freshly generated shape. It decodes full-resolution images
                    // from the URL and scales them down for display, so when large images
                    // pile up, main-thread decoding overlaps and scrolling stalls.
                    AsyncImage(url: item.fileURL) { image in
                        image.resizable().scaledToFill()
                    } placeholder: {
                        Color(.secondarySystemBackground)
                    }
                    .frame(width: 110, height: 110)
                    .clipped()
                }
            }
        }
    }
}

What makes this heavy? AsyncImage does not "automatically lighten the image to fit the display size." A 3024×4032 wallpaper is decoded into a full-resolution bitmap even when it only needs to fit a 110-point cell. Each image uses tens of megabytes of memory, and when that decode runs on the main thread, frames can't be drawn during it, so scrolling freezes for a moment. Chain that across every visible cell and you have the stutter.

The official docs say AsyncImage is "convenient," but they don't emphasize that it's "not suited to large volumes of high-resolution images." It's a trap you only discover once you feed it genuinely heavy images.

Measure first — numbers, not gut feeling

If you start fixing based on "it feels laggy," you won't know whether your change helped. Build a measurement footing first.

In Xcode Instruments, choose the Animation Hitches template and scroll the grid on a real device. Watch the "hitch time ratio" (milliseconds per second): how many milliseconds of frames were delayed per second of scrolling. Apple's guidance is that it becomes perceptible past 5 ms/s and clearly catches past 10 ms/s.

SymptomWhat the measurement showsLikely cause
Brief freeze at the start of a scrollTime Profiler shows decode functions on the main threadFull-resolution decode
Stutter during fast scrollsHitch time ratio above 10 ms/sPer-cell re-decode and re-render
Gets heavier the further you scrollMemory usage climbs steadilyDecoded bitmaps not being released

I make a habit of taking this measurement "before fixing" and "after each single change." Downsampling alone often drops the hitch substantially, and the numbers tell you when you've done enough. After release, Xcode Organizer's "Hitch Rate" lets you track real users' values, so it doubles as a verification footing.

✦

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
✦If your wallpaper-style image grid stalls on scroll, you can apply a concrete hitch-reducing implementation today
✦You can replace the naive full-resolution image load with memory-friendly ImageIO thumbnail generation
✦You'll be able to use Instruments Hitches to see exactly where and how much your grid stutters, and compare before and after
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

⬡ Dev Tools2026-07-18
The Generated Screen That Quietly Jams at AX5 and in German — Putting Layout Resilience Checks on Rork Max SwiftUI
A record of running every Rork Max generated SwiftUI screen through pseudolocalization and the largest text size to find exactly where it jams. Covers when to reach for ViewThatFits, ScaledMetric and layoutPriority, plus the snapshot checks that catch regressions every time you regenerate.
⬡ Dev Tools2026-05-17
Reading Rork Max's SwiftUI Generation Through a Wallpaper App's Requirements — What to Trust, What to Fix, What to Write by Hand
Typical wallpaper-app requirements — grid, pinch-zoom, slideshow, photo-library permission, ads, in-app purchase — handed to Rork Max's SwiftUI generation: where the output tends to hold up and where it tends to break. For the memory failure that bites first, this note includes decode-time downsampling, a bounded cache, and a procedure for measuring on your own device.
⬡ Dev Tools2026-05-12
Building a Shared UI Component Library with Swift Package Manager in Rork Max
A practical guide to building a shared SwiftUI component library with Swift Package Manager for indie developers running multiple apps — eliminate duplicate code across wallpaper, healing, and similar app families.