-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
ext\curl\tests\bug45161.phpt
test is absurdly slow on Windows
#10753
Comments
The same happens on PHP 8.0.28 NTS x64 |
Can someone please look into this issue? |
I don't have a Windows machine to test this. Is running it locally equally slow? |
Yes. Running the tests for curl takes on my machine 250 seconds, almost entirely due to this single test. |
@Jan-E Are the requests that slow? Can you debug the script to check which part causes it? |
I debugged the script by adding milliseconds to the output. All tests were done with Curl 8.0.1.
Of course the test failed with the extra output, but it told me that on my machine every Which raises the question: is the curl request slow or the server that the test script launches? The server listens on localhost on a random port, but as long as the script was running I could detect on which port and launch the same request from a DOS-prompt. Detecting the port:
Doing the same request with curl.exe:
Execution time: 0.281 s. A bit longer than the same request from within PHP.
Execution time: 0.076 s, which amounts to about 27% of the time curl.exe took for it. Conclusions: the test server on Windows is slow. but it seems that requesting http://localhost:60323/get.inc by means of Curl is causing a greater delay. As a BTW: I am getting the same results for this test from PHP 7.3 onwards. The test in PHP 7.2 was skipped as 'Not for Windows'. |
On Linux the entire test with all 1024 iterations finishes in 0.15 seconds. I'm not sure what's going on here on Windows. This could also be an issue with cli-server itself on Windows. |
@iluuu1994 No. And I don't have a windows machine do test it. It looks like it's really a curl issue, we should probably report this upstream. |
See GH-10753 The test is insanely slow on Windows and it's unclear why. It might be a curl issue.
OpenSSL 3.2 has some changes which may improve things. Is anyone able to compare 3.0 vs 3.2? |
I faintly remember a super slow test on Windows after some cURL update; I don't remember exactly which test it has been, but the issue might have been related to curl/curl#9296 (so that would have been cURL 7.85.0). Anyhow, bug45161.phpt (without that SKIPIF section) runs pretty fast for me (PHP-8.2, cURL 8.7.1), but is somewhat slower (~7s) on PHP-8.1, cURL 7.77.0. When I replace the |
This issue is easily verifyable using linux/Windows Github Actions CI based on the description:
of course, with 4b22c3e reverted |
@mvorisek, it is not listed in the slow tests section for a recent test build. Either the test has not been executed, or it isn't that slow anymore. |
So let's land cmb69@1bd111e and close this issue. |
Let's wait a bit, please. I want to see how long the test took. |
On my system with PHP 8.4.0 Alpha 2 NTS x64:
1.5 seconds is not insanely long, given that all curl tests take 29 seconds on the same system. |
That is with this build: Curl 8.8.0, OpenSSL 3.0.14 |
So we might assume that this has been "fixed in third party library" (unless someone is willing to verify this exactly). |
I am not going to do the analysis in #10753 (comment) once again, so I guess that would be right. Building PHP 8.2.22RC1 TS x64 right now to verify that the test takes about 1 second on my system as well. I will edit the test time into this comment once it has been done. Edit No fractions of seconds when running the 8.2 tests. 1 or 2 seconds for bug45161 out of a total of 34/35 for all curl tests. |
Description
I report this as a performance bug.
CI: https://github.com/php/php-src/actions/runs/4308375002/jobs/7514584871#step:8:113
on Windows 1024 iterations - https://github.com/php/php-src/blob/master/ext/curl/tests/bug45161.phpt - takes > 200 seconds, on linux/MacOS it takes <1 second
there is probably something wrong with Windows code
maybe related with #10119
PHP Version
8.2 and master, x86 and x64
Operating System
Windows
The text was updated successfully, but these errors were encountered: