Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue - Help needed for optimization #281

Closed
lasryaric opened this issue Mar 19, 2013 · 3 comments
Closed

Performance issue - Help needed for optimization #281

lasryaric opened this issue Mar 19, 2013 · 3 comments

Comments

@lasryaric
Copy link

Hi everyone. I spent a lot of time trying to optimize a serialization but I'm really having a hard time trying to solve this. So I'm going to post here all the data I was able to get.

I'm serializing a list of 50 "Task" objects which are Doctrine ODM objects.
To each of these 50 objects, I have 2 "User" (Doctrine ODM, again) objects attached and one "Project". The request takes ~700ms with half (or even more) of the time spent into the JMS serializer bundle.

So here is the final json output (gist) https://gist.github.com/lasryaric/c91362b1715f0004d677

Here is the screenshot of the kachegrind report (via xdebug) of my http call :

qcachegrind

I understand that there is a lot of ways to optimize the output itself but still, it looks like the JMS serializer is taking a lot of time here and I would love to get some feedback to help me optimize that.
I'm thinking of a way to cache the result returned by the "JMS\Serializer\GraphNavigator->accept <cycle 4>" function or the "JMS\Serializer\GenericSerializationVisitor->visitProperty <cycle 4>" because most of the time, their input/output should be the same.

Thanks for helping.

@schmittjoh
Copy link
Owner

I don't see how you could cache the output for accept or visitProperty as both depend upon the object that is being serialized.

@turneliusz
Copy link

Serializer is quite heavy for bigger graphs of objects, especially in combination with Doctrine, as the mapping and transformation of values is being done twice.

@goetas
Copy link
Collaborator

goetas commented Apr 3, 2017

closing,
sorry for the incredibly long feedback loop. the issue seems to be not really active

@goetas goetas closed this as completed Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants