Reusing the same curl handle. Big performance increase?

后端 未结 5 719
一整个雨季
一整个雨季 2020-12-02 15:43

In a php script I am doing a lot of different cUrl GET requests (a hundred) to different URL.

Is reusing the same curl handle from curl_init will improve the perform

5条回答
  •  猫巷女王i
    2020-12-02 16:25

    It depends how many requests you will be making - the overhead for closing & reopening each is negligable, but when doing a thousand? Could be a few seconds or more.

    I believe curl_multi_init would be the fastest method.

    The whole thing depends on how many requests you need to do.

提交回复
热议问题