Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Serializer] Performance degradation #54865

Copy link
Copy link
Closed
@mateuszsip

Description

@mateuszsip
Issue body actions

Symfony version(s) affected

7.0.7, 6.4.7

Description

Recently after renovate upgrade bumping a few SF components (including serializer bump 6.4.6 -> 6.4.7) we noticed that our service started having performance problems on one endpoint.

CPU usage went to 100%, service autoscaled up to the limit and we've noticed on traces that service is getting stuck on processing not related to any IO operations.

What's specific about this endpoint is that we receive large json strings that are at some point getting serialized/deserialized and that's what got slow after upgrade.

At some point I even upgraded service to SF 7.0.7 and problem didn't go away.
It looks that downgrading to 6.4.6 or 7.0.6 helps, so I believe that root cause is here: symfony/serializer@v7.0.6...v7.0.7

I don't have any profiles that would tell exactly where it uses so much CPU the problem.

How to reproduce

I will do my best to prepare example repo later today.

Possible Solution

No response

Additional Context

We denormalize payload to an object that uses attributes with serialization group and public getters/setters.
See that changes between tags are related to that.

To test fixes, I prepared a load test using example payload (~850kb)
image
And p95 went to above 15s on 7.0.7.

Where on revision with a simple serializer dowgrade to 7.0.6 and exactly the same test it's back to normal:
image

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.