Home > Backend Development > PHP Tutorial > 网页使用curl_multi多线程后速度变得更慢了?

网页使用curl_multi多线程后速度变得更慢了?

WBOY
Release: 2016-06-23 14:25:13
Original
1238 people have browsed it

多线程 curl

curl_init()是单线程,curl_multi_init()是多线程,网页使用curl_multi多线程后速度变得更慢了?是不是多线程消耗cpu和内存更多导致性能降低呢。
http://www.webkaka.com/tutorial/php/2013/102843/

回复讨论(解决方案)

很奇怪的是结论是如何得出的?
因为没有做为参照的单线程代码

你可以不使用curl_multi_init(),而是自己写多线程。php不是已经支持多线程了吗。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template