You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While we were talking with @mtarld, we noticed the method LiveComponentMetadataFactory::createLivePropMetadata could be optimized.
For a given class name and property name, the result will always be the same, meaning we don't have to re-compute the LivePropMetadata|LegacyLivePropMetadata each time this method is called, especially by the LiveComponentHydrator.
The result could be put in static-cache or maybe in a filesystem cache (e.g.: if introducing a warmup system).
I didn't profile the code yet, but if your app has many users, it can definitely be interesting :)
EDIT: in my local env, that's between ~10ms and ~20ms for the LiveMemory:* and InvoiceCreator* live components.
That's not much, but relying on Reflection during the runtime is not super efficient. I will see to cache-warm the up!
Activity
Kocal commentedon Jun 6, 2025
When playing with https://ux.symfony.com/demos/live-memory/, we can see the 7 calls to

createLivePropMetadata
each time we interact with the live component:I didn't profile the code yet, but if your app has many users, it can definitely be interesting :)
EDIT: in my local env, that's between ~10ms and ~20ms for the
LiveMemory:*
andInvoiceCreator*
live components.That's not much, but relying on Reflection during the runtime is not super efficient. I will see to cache-warm the up!
smnandre commentedon Jun 6, 2025
Absolutely! The Hydrator needs to be split into separated responsabilities, if you're looking at related things after this one 😓
Union or intersection types are not supported for LiveProps
with TypeInfo 7.1 #2827