Description
In our project, alot of time is spent serializing our object graph to JSON using the JMS serializer. So we were looking at alternatives to speed things up. Naturally we now tried the symfony serializer with the recent new features that we would need like groups, property naming strategies etc.
So we did some performance benchmarks to compare JMS serializer and symfony serializer with real-world data. Serializing our rather big object graph (which results in ~130 kB of json) 100 times takes
- JMS: 6.75 seconds
- Symfony: 14.11 seconds
So the symfony serializer is roughly TWICE as SLOW. No caching was involved. But that shouldn't have influence as the test was run in a single PHP process. That the symfony serializer is even slower is not what we expected since it's code base looks slimmer.
@dunglas any idea what is causing this huge difference?