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
[Doctrine] Hydration profiling #4939
Comments
At the moment, the ORM does not provide any way to collect this data |
Yeah, I checked and I guess it would be doable by extending the EM & wrapping the hydrator, but it's not a small task and it would stop working if people extend the EM themselves. |
It would not work this way. The hydration is not handled by the EM. Proxies and persistent collections don't use the EM, meaning you would loose many hydrations. |
Well I don't know if anything else creates hydrators, but extending the EM was just a way to wrap the hydrators so that we can collect info when they're called. |
As I said previously, both collections and proxies also call the hydrators, without going through the entity manager. |
And as I said, the goal is just to wrap the hydrators inside the EM. From a quick search the only place where hydrators are instantiate seems to be in EM::newHydrator - if you extend that with:
Then they should hopefully all be created with wrappers, and passed to the proxies and collections with the wrappers. The missing piece is an interface for hydrators. |
Moved as doctrine/DoctrineBundle#109 |
At the moment, the DoctrineDataCollector reports the query duration, but not the time it takes to hydrate. I see a query taking 0.5sec and my controller taking 20seconds in the timeline. If the doctrine pane reported the query as having taken 0.5sec + ~20sec to hydrate, it would be a bit easier to see what the hell is going on.
The text was updated successfully, but these errors were encountered: