Hi everyone.
I'm currently performing some profiling on an API I work on,
and I'm kind of surprise by the cost of serialization.
I serialize a collection of 12 objects with ~25 properties (that's a small one),
and use Hateoas to add some links.
The serialization part only take about 40ms on my machine, for such a small collection. that's 70% of my total request time.
Here is some of the most expensive calls:
- JMS\Serializer\GraphNavigator::accept
- JMS\Serializer\GenericSerializationVisitor::visitProperty
- JMS\Serializer\Metadata\PropertyMetadata::getValue
- Hateoas\Serializer\EventSubscriber\JsonEventSubscriber::onPostSerialize
I'm going through the code to find some bottlenecks but it's mostly that `accept` method in the GraphNavigator, called 300+ times.
So my question is about your feedback,
do you also experience slow responses times when using the full stack Serializer/Hateoas suite?
what can we do to improve the speed?
what response time should I expect?
Thx everyone,
Damien