← Graph

Partial Rendering Overhead

concept 2 connections

Performance observation surfaced by Stephen Margheim: ActionView itself is very fast, but calling out to a partial is much slower because Rails must find and compile the partial file. Most applications accumulate 3–6 layers of partials (view → header partial → left/right partials → button partial). In Margheim's benchmarks, introducing just one partial (extracting a table row from an index view) made the endpoint 40% slower. SQLite was faster than ActionView in the same benchmarks, so partial depth often outweighs query cost. Lesson: fix slow queries but don't ignore partial depth.

category
practice
about
Partial Rendering Overhead concept
Stephen explained how ActionView partials are the hidden Rails performance cost.
about
Partial Rendering Overhead concept
Phlex's advantage grows with the number of partials/components because ActionView partial lookup dominates.

Provenance

Created in
Performance Panel at wroclove.rb 2024 2026-04-17 23:20
Read by
5 extractions