Benchmark Overview

This benchmark evaluates architectural strategies for maintaining synchronized UI navigation state (sidebar, breadcrumbs, tabs, subtabs, and step indicators) during HTMX partial updates. It compares traditional full-page rendering against manual out-of-band (OOB) swapping and automated django-htmx-nav strategies.

For code patterns and detailed framework design, refer to the official documentation .

Implementation Approaches

8 Families Evaluated
Chart Legend & Suffixes: Charts display shortened variant labels (e.g., HTMX-Nav-Decl).
+HS = hx-select enabled +M = idiomorph morphing enabled
mpa

Pure MPA

Standard Multi-Page Application performing full page reloads on every navigation.

Chart Label: Pure MPA
vanilla

Vanilla HTMX unaware views

HTMX-unaware views with templates wrapped in hx-boost, returning full HTML shells on partial requests.

Chart Label: Vanilla
vanilla

Vanilla HTMX Composite OOB

Manual out-of-band (OOB) swaps in Python views for coarse navigation components (sidebar and breadcrumbs).

Chart Label: Vanilla-Comp
vanilla

Vanilla HTMX Atomic OOB

Manual out-of-band (OOB) swaps for all navigation components, requiring conditional template rendering.

Chart Label: Vanilla-Atom
package htmx-nav

HTMX Nav Baseline

Basic django-htmx-nav implementation using render_shell with static OOB swaps and default partials.

Chart Label: HTMX-Nav-Base
package htmx-nav

HTMX Nav Composite

Uses render_nav to dynamically attach OOB swaps for sidebar and breadcrumbs.

Chart Label: HTMX-Nav-Comp
package htmx-nav

HTMX Nav Atomic

Uses render_nav to target all individual navigation components for precise OOB updates.

Chart Label: HTMX-Nav-Atom
package htmx-nav

HTMX Nav Declarative

Declarative navigation registry system that automatically handles render_shell, keeping views thin.

Chart Label: HTMX-Nav-Decl

Benchmark Highlights

Hand-picked findings from a pinned reference benchmark run.

Explore Raw Metrics