-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 regression from 3.7.x to 4.4.x #1541
Comments
I'm curious what impact disabling the circular reference collector is having. |
Good point. There is no real impact for 3.7:
phpunit 4.4 shows a slight memory usage decrease
|
~30% reduction in memory consumption is not too bad. Are you disabling xdebug before running these? That might yield a better baseline. |
I agree. I ran the entire testsuite to get a better picture of the effect and memory usage dropped back to 125MB (from more than 200) so it's also closer to 50% reduction. There is still a 25% increase though compared to 3.7, but it's not a huge deal anymore. The runtime drop remained though. Previous numbers were all with xdebug enabled, tested again without xdebug:
and phpunit 4.4
The runtime numbers are now really close, so I also had a look what the effect would be on the entire testsuite and it's 13.35s/77.25MB for 3.7 vs. 14.84s/102MB for 4.4. Still a ~40% memory usage increase, but the runtime regression looks like coming from an xdebug related feature. Not sure it's code coverage as I get much less a performance boost when I disable that alone. |
Would you mind trying the current alpha release which contains some performance improvements? Also, maybe it's better to compare apples to apples by testing against the 3.7.x phar. |
I did some more testing with multiple versions and can confirm that when taking #1546 out of the equation the current alpha release fixes all remaining runtime performance regressions. In certain scenarios it was now even running faster than 3.7. The memory usage regression remains however, still about 30-40%. There was no difference in performance numbers between the pear installed phpunit and the phar version (as kind of expected). |
@pprkut Thanks so much for your continued support on this issue :) I've noticed small increases in peak memory consumption between versions, but it's usually ~1MB and varies from suite to suite. I ran a number of the smaller suites from your library and found very similar results: Core Suite (PHPUnit 3.7.34):
Core Suite (PHPUnit alpha):
Feedback Suite (PHPUnit 3.7.34):
Feedback Suite (PHPUnit alpha):
Flare Suite (PHPUnit 3.7.34):
Flare Suite (PHPUnit alpha):
Spark Suite (PHPUnit 3.7.34):
Spark Suite (PHPUnit alpha):
It would require a bit of time for me to setup the proper environment to run all the suites. I was able to narrow the increased memory usage in the Vortex suite down to the Vortex Suite (PHPUnit 3.7.34):
Vortex Suite (PHPUnit alpha):
As much as I'd like to help figure out what's happening with the Anyway, I think I will close this for now since it's currently hard to reproduce without installing a handful of extensions. If you have time to track down the issue in the Thanks again :) |
Thank you for taking a closer look! I doubt the |
No problemo :)
I don't doubt that some change in PHPUnit over the past couple of years is responsible for the increased memory usage. There's just really only so much time that we can invest into tracking down a ~5MB difference in peak memory usage. I've already invested a couple of hours and installed a number of extensions and I'm still unable to run the full suite or reproduce the issue.
Please do! |
I'm trying to migrate a bigger project from phpunit 3.7.x to the latest version and noticed some rather drastic and unfortunate performance regressions. The project in question is https://github.com/pprkut/lunr
Now, running the entire test suite takes about 2 minutes in 3.7 and about 6 minutes in 4.4, memory usage increases from about 95MB to more than 200MB. It's a rather large testsuite and I'm sure part of the problem is caused by #1456. But I singled out a smaller testsuite that doesn't have any process isolation and still exhibits a visible performance regression.
Using phpunit 3.7 I get
and using phpunit 4.4 I get
Since the config file for phpunit needs minor modifications when switching between the two versions I made convenience branches to allow for easier testing. You can find the branch for 3.7 at https://github.com/pprkut/lunr/tree/phpunit_37 and for 4.4 at https://github.com/pprkut/lunr/tree/phpunit_44.
I'm testing this on a Linux system, using php 5.6.0, phpunit 3.7.34 from pear and the phar version of phpunit 4.4.0
The text was updated successfully, but these errors were encountered: