8000 [Serializer] twice as slow as the JMS serializer · Issue #16179 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Serializer] twice as slow as the JMS serializer #16179
Closed
@Tobion

Description

@Tobion

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0