-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DI] Bad performance for dump/compile compared to 3.2.x #24201
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
Comments
Try updating to 3.3.9, there have been some performance tweaks. |
See also #23601 |
@NicoHaase Okay found out that symfony dropped support for PHP 7.0 in a bugfix release. That's quite tricky to spot. However after installing 3.3.9 the situation is still the same. So I update my issue with the newest version of symfony. |
@TiMESPLiNTER we haven't dropped support for PHP 7.0. We dropped support for 7.0.0 to 7.0.7 because they have bugs affecting Symfony too badly (and without workaround). PHP 7.0 is currently at version 7.0.23. Running 7.0.0 or 7.0.7 does not make sense (and these versions have security issues) |
@stof okay you're right. 😃 But still the performance issues persist. |
Try removing the ProxyManager and see if this improves performance, most calls seem to relate to from that library. |
There can be several reasons to this:
That'd be interesting to debug :) |
@nicolas-grekas a predumped container reusable for all tests (I have >5000) would be amazing. But I don't think it's possible, right? Well I still have the same amount of services declared as with 3.2.x or do you mean SF 3.3 declares more services than 3.2? @sstok but if I remove it the performance would be even worse if I instatiate all services all the time. I don't think I would be able to tell you whether tests are slower or faster than before. Or what were your thoughts behind that proposal? |
I was referring to SF 3.3 itself does declare some things differently, and may take more time to process those, but you're the first to report this amount of increase, so I'm not sure that's the core reason. Can you please share a link to the 3.3 profile itself? |
I ran into some issues with 3.3 and phpdbg (for coverage), as it took up too much memory during the container compilation. Solved this issue by using composer scripts to first build the test container and then have my scripts use that. |
Blackfire profiles welcomed, either publicly or privately (e.g. on SF-dev Slack.) |
How can I disable that feature? @iltar That sounds very interesting. How have you done that? Because that would help speeding up the test suite anyway. 👍 |
@TiMESPLiNTER same as for autowiring: it's not enabled, unless you did it. So only you know the answer. |
@nicolas-grekas so it's definitely not enabled then. 😉 |
@TiMESPLiNTER basically what I've done (to not go off-topic too much, can discuss this on slack), is add this to composer: "scripts": {
"build:test-env": "bin/console cache:clear --env=test --no-warmup; bin/console cache:warmup --env=test"
}, Additionally I've added this in my test cases that require the container/app: public static function getKernelClass(): string
{
return AppKernel::class;
} Then everything that runs my tests (even if in matrix on same user/machine), uses that test env when I run |
Okay I realized I compared a non-cached container test run against a cached one which explains the difference between the two test runs I did. I'm working on a new profiling with cache. Sorry for the confusion. |
We found the issue. We use the class SerializerFactory
{
public function getSerializer()
{
return SerializerBuilder::create()->build();
}
} which we then use in the I have no idea why the Thanks for your help. 😃 It was hard to find that issue but I guess it doesn't really have something todo wth SF. |
Uh oh!
There was an error while loading. Please reload this page.
I upgraded from the latest 3.2.x version to 3.3.6 and have massive performance issues (during PHPUnit tests) which I could track down to the container component. I did some benchmarks for both 3.2.x and 3.3.6 and compared them (see blackfire screenshot - removed as comparision is no accurate yet).
I don't use autowiring at all and disabled it in config to make sure bad performance is not caused by this feature.
If I can provide any additional information to solve this "bug" just let me know.
app/config.yml
Benchmarks
The text was updated successfully, but these errors were encountered: