Lost Lily/Grid ToolkitDocs 1.0
Table of Contents

Size and profile renderer workloads

When to use

Profile before increasing board size or adding decorations, text, sprites, and prefabs. Cell count, physical handles, mesh vertices, and changed visual groups affect different parts of the cost. Use GridBoardRendererBase statistics alongside the Unity Profiler to understand your renderer's work.

Before you start

Build a representative scene with your intended cell builders, structure visuals, decorations, and interactions. Record the target platform and frame budget before comparing measurements.

Measured development baseline

The 2026-10-04 development run used Unity 6000.6.3f1, Windows 11 10.0.26200, an AMD Ryzen 9 9950X3D (32 logical processors), 31,800 MiB RAM, and an NVIDIA RTX 3060 (12,113 MiB VRAM, driver 32.0.15.9186), with Direct3D 11 and active URP 17.6.0 Universal Renderer. It measured Square rectangles with cell size 1 and the generated-node builders in an Editor batch process outside Play Mode. Each phase was measured once after garbage collection; these are CPU work measurements, so they do not establish a frame rate or player performance guarantee.

Cells World 3D initial (ms) uGUI initial (ms) World one-cell hover (ms) uGUI one-cell hover (ms)
100 59.447 27.980 8.643 1.878
1,000 74.219 48.823 5.448 5.496
10,000 800.294 432.377 65.718 77.234

World 3D used one physical handle per cell; uGUI used one generated-geometry group. One thousand stationary Flush calls took 0.008–0.118 ms and caused no new flushes. Hover dirtied one cell and performed no full synchronization; in this configuration it did not change a physical handle. Retained bookkeeping can still cost time even when no mesh changes.

These measurements characterize the development candidate. Repeat them with the final package and retain the full output when comparing releases.

Practical guidance

Start with the 8×8 starter or a small Inventory board. Create larger boards during a loading step and profile their initial synchronization; the measured 10,000-cell cost can interrupt interaction. Measure your actual hover, selection, drag, and placement workloads separately. At 10,000 cells, even the measured one-cell hover work exceeded a 16.7 ms frame budget on this machine.

Keep generated geometry in compatible visual groups where possible. Labels, sprites, and prefabs may use separate handles and have different costs. uGUI rebuilds each affected group once per synchronization, so a change to a large group can still rebuild substantial geometry. Use smaller visible regions or a project-owned renderer when your measured workload requires them.

Procedure

  1. Measure a representative board at 100, 1,000, and 10,000 cells, or at your intended sizes.
  2. Record Editor/player version, hardware, pipeline, graphics API, builders, and decorations.
  3. Measure initial binding, stationary work, and real changed-cell/structure/channel interactions.
  4. Inspect renderer statistics for physical handles, dirty elements, flushes, and full synchronizations.
  5. Repeat in a player on target hardware; inspect the Profiler for allocations, Canvas rebuilds, mesh work, draw calls, and GPU time.

Maintainers can run the existing Development > Benchmarks > Run Renderer Benchmark command. Its output is in TestResults/GridToolkit/Performance/latest.txt in the source project.

Result

You have measurements for initialization and representative updates, with the configuration needed to repeat them. Choose board sizes and rendering options from those measurements.