Bug #77930 [Com]: stream_copy_to_stream should use mmap more often
| From: | maggus dot staab at googlemail dot com | Date: | Tue, 23 Apr 2019 07:35:39 +0000 |
| Subject: | Bug #77930 [Com]: stream_copy_to_stream should use mmap more often | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-220563@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77930&edit=1
ID: 77930
Comment by: maggus dot staab at googlemail dot com
Reported by: maggus dot staab at googlemail dot com
Summary: stream_copy_to_stream should use mmap more often
Status: Open
Type: Bug
Package: Streams related
PHP Version: 7.2.17
Block user comment: N
Private report: N
New Comment:
please find the very detailed bug report on https://github.com/sabre-io/http/pull/119
Previous Comments:
------------------------------------------------------------------------
[2019-04-23 07:31:50] maggus dot staab at googlemail dot com
Description:
------------
we got a bug report in our http client library https://github.com/sabre-io/http/pull/119 which
suggests to change our call to stream_copy_to_stream() to stream in chunks with a size of 4MiB
because its nearly 2x faster .
the reason is that when you only copy in 4MiB chunks php internally uses mmap.
wouldn't it make sense that stream_copy_to_stream() internally would do the chunking to speedup
this use-case instead (on php-src level)?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77930&edit=1