Why Your Unity Scroll View Lags at 1,000 Items, and the Recycling Fix
A uGUI ScrollRect with a thousand rows creates a thousand GameObjects, and the frame time shows it. Here is why the standard approach falls over, what a recycling scroll view does instead, and when to write one versus buy one.
The usual way to fill a uGUI list is to loop over the data and Instantiate a row prefab under a Content object with a Vertical Layout Group. It works for a settings menu. It stops working somewhere between 200 and 1,000 rows, and it stops in a way that is hard to see in the editor and obvious on a phone: the first frame after opening the screen takes hundreds of milliseconds, scrolling stutters, and memory climbs with the data.
Why it falls over
- Instantiation cost is paid up front for every row, including the 990 the player will never scroll to.
- Layout groups rebuild the whole hierarchy when anything changes. One text update in one row can trigger a layout pass over all of them.
- Canvas batching: every row is a set of draw calls in the same canvas; the canvas re-batches when any row moves.
- Memory: each row holds its own Image, Text and RectTransform. At 100,000 rows the hierarchy is the app.
What recycling does instead
A recycling (or virtualised) scroll view keeps only as many cells as fit in the viewport plus a small buffer, often 10 to 20, and moves them as the user scrolls. When a cell leaves the top it is repositioned at the bottom and rebound to the next data item. The data list can be any size; the hierarchy never grows. The scroll bar still reflects the full range because the content size is computed from item count times item size, not from real children.
The parts you have to get right, in order of how often people get them wrong: variable-height cells, grids, keeping the scroll position when the data changes, cell state that must survive recycling (a toggled checkbox), and touch handling on cells that move under the finger.
Build or buy
A fixed-height vertical recycler is an afternoon. Grids, variable heights, horizontal and snapping carousels, data-change diffing and a clean authoring API are two to three weeks, plus the bugs you find on device. If you need more than the afternoon version, this is one of the cheaper buys in Unity. VeloScroll keeps a bounded set of cells around the viewport, recycles whatever cell prefab you supply, handles lists, grids and tables, and is built for Unity 6; the product page lists the use cases it ships demos for, from inventories to chat histories.
A quick check on any recycler, yours or bought: bind it to 100,000 items, open the Profiler, and scroll fast. Frame time should be flat and the hierarchy count should not move. If either climbs, it is instantiating.