ID:               49938
 Updated by:       fel...@php.net
 Reported By:      nodkz at mail dot ru
-Status:           Open
+Status:           Assigned
 Bug Type:         PHAR related
 Operating System: Windows XP
 PHP Version:      5.3.1RC2
-Assigned To:      
+Assigned To:      cellog


Previous Comments:
------------------------------------------------------------------------

[2009-10-21 07:57:23] nodkz at mail dot ru

Description:
------------
I need add 100 000 files to phar arhive.
First 1000 files insert very quick. But when I insert from 9000 to
10000, it works about 20 minutes.

I found that every changes writes to disk. In documentation I so
buffering operation to maket set of change, before writing to disk. If I
run startBuffering()/stopBuffering() commands.

So I try to run startBuffering() on PHP 5.2.11 - it doesn't work.
So I install PHP5.3.1RC2 - it doesn't work again.

Reproduce code:
---------------
$phar = new Phar('test.phar');
$phar->startBuffering();
var_dump($phar->isBuffering());

for($i=0;$i<100000;$i++) {
   // write data in files  XXX/XXX.txt
   $phar->addFromString( floor($i/1000).'/'.($i%1000).'txt', 'some
data');
}
$phar->stopBuffering();

Expected result:
----------------
Expect to see
   bool(true)



Actual result:
--------------
But scripts shows: 
   bool(false)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49938&edit=1

Reply via email to