Bug #80399 [Opn->Ver]: Using PharData to create TAR files is super slow (at least 10x slower)
| From: | cmb@php.net | Date: | Mon, 14 Dec 2020 15:22:26 +0000 |
| Subject: | Bug #80399 [Opn->Ver]: Using PharData to create TAR files is super slow (at least 10x slower) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-231083@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80399&edit=1
ID: 80399
Updated by: cmb@php.net
Reported by: maggus dot staab+php at googlemail dot com
Summary: Using PharData to create TAR files is super slow (at
least 10x slower)
-Status: Open
+Status: Verified
Type: Bug
Package: PHAR related
Operating System: windows10x64
PHP Version: 7.3.24
Block user comment: N
Private report: N
New Comment:
I can confirm your findings with current PHP-7.4 HEAD. The problem
is that each PharData::addFile() flushes the archive, i.e.
completely writes it back to disk. That takes time...
Previous Comments:
------------------------------------------------------------------------
[2020-11-23 12:33:59] maggus dot staab+php at googlemail dot com
thx for coming back to me.
I justed did a blackfire profile and measured the non-profiled timings on a few more servers and
php-versions.
have a look at the readme: https://github.com/staabm/php-phardata-benchmark
I don't have a server at my disposal where the latest php version is available.
everything I have is ubuntu LTS bound
------------------------------------------------------------------------
[2020-11-23 12:02:42] cmb@php.net
Could you please check the performace for PHP 7.4.12? And also,
could you check that with the blackfire extension?
------------------------------------------------------------------------
[2020-11-22 11:40:01] maggus dot staab+php at googlemail dot com
Description:
------------
while working on one of our projects we figured creating TAR files with PharData would be a great
fit, because its php-src builtin.
it turns out though creating TAR Files with PharData is super slow, compared to userland php
implementation.
we see 10x slower performance.
see a benchmark and repro script at https://github.com/staabm/php-phardata-benchmark
Expected result:
----------------
PharData should be at least on paar with php userland implementations
Actual result:
--------------
its slow
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80399&edit=1