SwiftUI List Is Built on UIKit and AppKit Views

SwiftUI List layers on top of a table view and collection view

The SwiftUI List is a thin layer over older Apple containers. Inspecting a running app shows a table view on the Mac and a collection view on iPhone and iPad. SwiftUI supplies cells, change detection and glue code, and the platform container does the rest.

Which classes sit underneath

On macOS the container is SwiftUIOutlineListView, a subclass of NSOutlineView, which itself descends from NSTableView. It has one column and automatic row heights. Every live row is a ListTableRowView wrapping a ListTableCellView, and a hosting view inside carries your SwiftUI row.

On iPhone and iPad it is an UpdateCoalescingCollectionView, a UICollectionView using a compositional layout. Cells are ListCollectionViewCell, a UICollectionViewListCell with an empty content configuration and a hosting view for the row. The simulator, a real iPhone and a real iPad report identical class names, and no UITableView appears.

One SwiftUI object plays data source and delegate on each platform: OutlineListCoordinator on the Mac, UICollectionViewListCoordinator on iOS. The iOS coordinator is no UICollectionViewDiffableDataSource, because SwiftUI diffs the data itself. Table follows the same pattern, with an outline view on macOS and the List collection view class on iOS.

How the classes were found

Two methods that share no code produced the answer. The Objective-C runtime names the class of each object in the view tree, and a custom layer viewer reads the delegate of every layer in the live app. Agreement between them settled each class name. Both probes were first run against a plain NSTableView and a plain UICollectionView, where the correct answer was known.

What SwiftUI contributes

Only rows on screen get views, at 100 rows or 100,000. The Mac showed 38 row views in a 900 point window, and an iPhone screen showed 16 cells. The platform handles that recycling, while SwiftUI hosts the content of each cell.

The diff is SwiftUI’s own code, and it sends the container a minimal set of structural calls. On a 1,000-row list, hooks on reloadData, reloadItem and the other reload methods stayed silent when one row changed, and again when a tenth of the rows did. The rows still refreshed, which suggests the update goes through SwiftUI’s own graph into the hosting view. That route is an inference, since it was not hooked.

Timing matters too. The diff runs at the end of the run loop turn, not when you assign new data, so any timing of a List should stop after that turn completes.

Where the cost comes from

Updating a visible row in a plain collection view that leaves the layout alone took about 0.33 milliseconds at any list size. The List took 2.6 to 16.5.

Two controls isolated the cause. A collection view filled with the same SwiftUI rows behaved like a hand-built one, so hosting is not the expense. A hand-fed NSTableView displayed 100,000 rows in 39.7 milliseconds, and the List needed 39.6. The container is identical, so the difference is in how it gets its data.

At 100,000 one-line rows on the Mac, a SwiftUI update cost roughly 18 milliseconds against well under one for the hand-fed table. At 10,000 rows it was 4.7, so the per-change cost climbs with list size. Why was not measured. The table still isn’t faster everywhere: one screen of scrolling took 5.7 milliseconds by hand and 1.3 in the List.

When a self-sizing collection view loses

A collection view that measures its own rows from estimated heights posted the largest figure of all, 1,468 milliseconds to show the list. On an iPad the layout asked 36 cells to size themselves at first display for 100 rows and for 100,000, yet the time rose from 4.7 to 1,063 milliseconds. The layout is the expense. With one fixed row height, appending 50 rows took 5 or 6 milliseconds from 1,000 rows to 100,000.

A hand-built container therefore wins when it removes work through a single row height and in-place updates. The List wins when rows must size themselves, since it only measures what is visible.

Limits of the study

A real iPad Pro reversed the Mac result: appending 50 rows to 10,000 took the List 74 milliseconds and the self-sizing collection view 14. Device runs wait for display frames, and early iPad figures failed to reproduce after a leak in the test runner was fixed.

One early result was also wrong. An if statement inside each row turned every row into a conditional view, slowing the List several times and yielding 3,031 milliseconds for 100,000 forum-style posts. With the test code fixed, the same list displayed in 67 milliseconds.

Testing covered only List and Table, on one Mac, an iPhone simulator, a real iPhone and a real iPad, running macOS 27.2.1, iOS 27.0 on the simulator and iOS 27.2.1 on devices. Class names are private and may change. LazyVStack, LazyVGrid, sections, selection and edit mode were not examined.

The full numbers are coming

A longer write-up, “Is a Collection View Faster Than a SwiftUI List? I Measured.”, is due next. The benchmark code, answer key and raw data are already public in a repository called ListBench. For now, a slow List usually means asking the table or collection view for expensive work, not that SwiftUI itself is slow.

Source: Aleahim.com

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.