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

Add the hydration time in the timeline #109

Open
stof opened this issue Sep 7, 2012 · 9 comments
Open

Add the hydration time in the timeline #109

stof opened this issue Sep 7, 2012 · 9 comments
Labels
Feature Status: On Hold Most likely waiting for upstream resolution

Comments

@stof
Copy link
Member

stof commented Sep 7, 2012

Currently, the doctrine timing in the timeline panel is only the DBAL time. The ORM time should be tracked too (it may require adding some logging points in the ORM)

@inaniyants
Copy link

could be useful:
implementation of hydration profiling https://github.com/debesha/DoctrineProfileExtraBundle.

@ostrolucky
Copy link
Member

I think such feature would be welcome addition, if hidden behind optional switch. Perhaps @debesha would be interested in contributing it here, so he doesn't have to maintain his own repository?

@stof
Copy link
Member Author

stof commented Mar 17, 2020

Well, I think we should strive for having a clean extension point in the ORM to build this feature, rather than the bunch of hacks needed in DoctrineProfileExtraBundle.

@ostrolucky
Copy link
Member

ORM folks probably wouldn't like performance impact this would have, even as just abstraction with empty implementation. Hydration is expensive.

@stof
Copy link
Member Author

stof commented Mar 17, 2020

well, if they allow decorating hydrators in an official way, this could be a cost you pay only when the feature is used (and I think the additional cost will be small compared to the hydration itself).

Currently, when looking at the webprofiler timeline panel, we see some timing for Doctrine, but this is really only the DBAL time. And when using Blackfire, I regularly see the hydration time being longer than the time spent executing the SQL query, so this is something important to show to users.

@ostrolucky
Copy link
Member

ostrolucky commented Mar 18, 2020

Let's postpone until ORM has this option then. @stof is there an issue for this in ORM repository?

@ostrolucky ostrolucky added Status: On Hold Most likely waiting for upstream resolution and removed Ready to work on labels Mar 18, 2020
@alcaeus
Copy link
Member

alcaeus commented Mar 18, 2020

Technically, there is an extension point: the HydratorFactory. It's not that easy to do but it can be done: new TimingHydratorFactory wraps the original factory and creates new Hydrators that wrap originals, including timing logic in the StopWatch component. If anyone wants to give this a shot, be my guest. This could also be contributed back to ORM as an optional feature, although I have my doubts that it will be accepted.

@ostrolucky
Copy link
Member

@alcaeus Unfortunately that's in ODM only

@alcaeus
Copy link
Member

alcaeus commented Mar 18, 2020

That makes it a little more complicated 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Status: On Hold Most likely waiting for upstream resolution
Projects
None yet
Development

No branches or pull requests

4 participants