Skip to content

Commit

Permalink
bug #34198 [HttpClient] Fix perf issue when doing thousands of reques…
Browse files Browse the repository at this point in the history
…ts with curl (nicolas-grekas)

This PR was merged into the 4.3 branch.

Discussion
----------

[HttpClient] Fix perf issue when doing thousands of requests with curl

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

Performing while scheduling requests was a terrible idea: it makes buffers fill in memory and requires CPU do deal with the pending list, while all this in dealt with much more efficiently by any response-reading code that comes after.

Commits
-------

e388b73 [HttpClient] Fix perf issue when doing thousands of requests with curl
  • Loading branch information
nicolas-grekas committed Oct 31, 2019
2 parents e8b31ff + e388b73 commit 06e7458
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Symfony/Component/HttpClient/Response/CurlResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ public function __construct(CurlClientState $multi, $ch, array $options = null,
// Schedule the request in a non-blocking way
$multi->openHandles[$id] = [$ch, $options];
curl_multi_add_handle($multi->handle, $ch);
self::perform($multi);
}

/**
Expand Down

0 comments on commit 06e7458

Please sign in to comment.