Open jderusse opened 5 years ago
I'll check this today.
Why there is no curl_multi_select
? Burning cpu seems to be normal here since we never wait for any activity and loop until something happens.
I think adding a simple curl_multi_select($this->multiHandle);
after curl_multi_exec
will do the trick
@jderusse, can you try changed version from branch https://github.com/php-http/curl-client/tree/issue-55-CurlMultirunner_burn_CPU ?
@jderusse, I've update branch. Can you check it?
Would you mind to open a PR @mekras ? It would be easier to review :-)
given the following snippet
Where running the script, my application consume A LOT of CPU while waiting for the request
Here CPU is used 1.638s + 1.523s = 3.161s to process this 3.190s script
when applying this durty patch
I get
now, the CPU is used 0.445s to process the same request.