Blaze

1 min read Original article ↗

Blaze ensures applications that push Blade to its limits stay fast, even as your component count grows.

$ composer require livewire/blaze

With Blaze Without Blaze

3s 5s 7s 0 25k 50k 75k 100k

Results vary with component complexity and optimization strategy.

Get started

No changes to your existing templates required.

See limitations

// Option A: Per-component directive
@blaze

// Option B: Optimize entire directories
Blaze::optimize()
    ->in(resource_path('views/components/app'));
    ->in(resource_path('views/components/admin'));

Optimization strategies

By default, Blaze uses an optimized compiler — a drop-in replacement that works for virtually all components. For even greater gains, enable memoization or compile-time folding.

Learn more

Optimized compiler default

Templates become optimized PHP functions. Drop-in replacement with no configuration needed.

Up to 97% overhead reduction

Memoize opt-in

Cache repeated component renders. Ideal for icons, avatars, and elements that appear many times with the same props.

Automatically cached components

Fold opt-in

Pre-render components at compile time into static HTML. Zero runtime cost — the component ceases to exist.

Eliminate all runtime overhead