Closed
Description
Firstly, great work and nice to see a component based way of working for Symfony.
Scenario
Creating components like shadcn with Twig Components is great. However, when using a lot of them, the performance degrades quickly. Especially when adding popovers with buttons in them for each cell.
- There seems to be overhead with the rendering of each component
- The response size gets very large (4 MB in the example) even compressed it takes quite a while for the browser to download and parse
Reproducer

- Checkout the reproducer
composer install
symfony server:start
Solutions
I'm probably switching back to simple HTML elements again (<button class="ghost">
) and use Tailwinds @apply
for different variants. Of course, I'd prefer to keep using the component approach.
Phoenix LiveView solved the 2. problem with an optimization, see Optimization #1: splitting statics from dynamics. This way the response size doesn't grow very large.