php-uv icon indicating copy to clipboard operation
php-uv copied to clipboard

Best way to download large files using php-uv

Open jimthunderbird opened this issue 12 years ago • 2 comments

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

jimthunderbird avatar Sep 15 '12 01:09 jimthunderbird

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.

chobie avatar Sep 15 '12 05:09 chobie

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.

jimthunderbird avatar Sep 15 '12 06:09 jimthunderbird