roschler Posted September 20, 2007 Share Posted September 20, 2007 I have a PHP script that retrieves URLs in parallel. An array of tracking objects is built with each object using fopen() to open one URL. Then I use a loop where fread() is called for each object's file handle until all documents are fully read. When I execute the script directly it's quite fast. But if I have another script execute this very same script using the system() command, with the exact same URLs, it's much, much slower. Is there something that affects URL retrievals with scripts spawned from the system() command that I don't know about? Thanks. Link to comment https://forums.phpfreaks.com/topic/69990-url-retrieval-slow-when-script-is-called-from-system/ Share on other sites More sharing options...
trq Posted September 20, 2007 Share Posted September 20, 2007 Calls to system() spawn a new process but that really shouldn't effect execution time too much at all. Is there any reason your using system() over a simple include though? Link to comment https://forums.phpfreaks.com/topic/69990-url-retrieval-slow-when-script-is-called-from-system/#findComment-351537 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.