chobie / php-uv

libuv php extension
184 stars 21 forks source link

Best way to download large files using php-uv #22

Open jimthunderbird opened 11 years ago

jimthunderbird commented 11 years ago

Hi, What will be the best way to download a large file over tcp using php-uv? Thanks. Best Regards, Jim

chobie commented 11 years ago

what is the purpose for this? maybe combination of uv_read_start and uv_fs_open i think.

Basically, decreasing function calls is the best way to improve PHP performance. so I should provide some functions which likes file_get_contents.

I didn't try to download a large file with php-uv yet. so it may contains some bugs regarding buffers.

jimthunderbird commented 11 years ago

One use case is to download files in parallel and keep track of their progress. Yeah, so an async version of file_get_contents will be great.