Engine template: Twig or Blade?

Will Kirby’s performance be affected if we use a template engine such as Twig or Blade?

Well, template languages have to be compiled to plain PHP, so yes, there will always be some overhead.

The Twig plugin has a PHP cache option, so for pages, where it makes sense to enable this option, the overhead will tend towards zero, I guess.

I have no experience myself with these template languages, so I can’t tell if the difference in performance is really noticeable as compared to a standard PHP template, but why not do some tests yourself…?

I have done them, but not in production, I wanted to see someone already gone through this experiences.
Thank you very much!

Blade caches it’s view to plain PHP. So you can expect little to zero performance overhead. You can always enable Kirby cache if you are concerned about performance.

1 Like