-
Notifications
You must be signed in to change notification settings - Fork 21
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
Dependency Injection is very slow #2745
Comments
Thanks @casperh123 - any chance you can drill in a little more? It might be pulling in some excess code from the Google packages or there might be a rogue external request we need to correct Any additional information you can pull from your New Relic instance would be appreciated as there will be a level of uniqueness to your setup too. Also confirming, the store you are optimizing has roughly products: 1488 And it doesn't have HPOS enabled? |
Also just wanted to cross link the issue here which has some additional discussion on the same topic: #1250 One of the suggestions was to check the type of requests and only load the services which are needed for each type of request. That will need some further investigation/testing to make sure that doesn't introduce additional conflicts. |
Heres some more detailed screenshots of some traces. They are too long to capture in a single screenshot, so they span multiple screenshots. The site does not have HPOS enabled at the moment. We are investigating wether or not some old dependencies are compatible. Trace #1 - Page: taxonomy-product-cat, function: GoogleListingsAndAdsPlugin::maybe_register_servicesPart 1Part 2Part 3Trace 2Part 1 - Page: single-productPart 2Part 3In the observed traces related to Dependency Injection, i havent seen any external calls. Just App Code. Let me know if there are specific data from our New Relic instance, that you would be interrested in. |
I'm not sure if it is related, but Core WooCommerce also had performance issues with their Dependency Injection library. |
Thanks @casperh123 for providing the additional screenshots. While I do agree that the Google for WooCommerce extension can improve it's loading of dependent classes (or at least the quantity depending on the request). However, what we see from those details isn't fully portraying the same picture as was described in the initial issue. For example we can see that for the frontend request it's spending 34.13ms in the function For the same reason you can find |
Describe the bug:
The dependency injection container operations in Google Listings and Ads are consuming are taking a long time to execute causing performance degradation.
Steps to reproduce:
This is especially bad on Admin pages, where we have the following trace:
Expected behavior:
Container operations should have minimal performance impact on plugin execution.
Actual behavior:
Container resolution is taking ~10-50% of execution time, primarily in:
Additional details:
System Status Report
The text was updated successfully, but these errors were encountered: