Bug #19661 [Opn->Bgs]: addModify is very slow in a loop

From: Date: Mon, 12 Nov 2012 13:21:20 +0000
Subject: Bug #19661 [Opn->Bgs]: addModify is very slow in a loop
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-9332@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19661&edit=1 ID: 19661 Updated by: mrook@php.net Reported By: anees dot ka at mistralsolutions dot com Summary: addModify is very slow in a loop -Status: Open +Status: Bogus Type: Bug Package: Archive_Tar Operating System: linux Package Version: 1.3.10 PHP Version: 5.3.7 Roadmap Versions: New Comment: -Status: Open +Status: Bogus Sorry, but your problem does not imply a bug in PEAR itself. For a list of more appropriate places to ask for help using PEAR, please visit http://pear.php.net/support/ as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PEAR. See my above comment, if you have issues with the package please (re)open a ticket or send a mail directly to me :) Previous Comments: ------------------------------------------------------------------------ [2012-10-24 21:59:10] mrook Passing an array instead of individual filenames into addModify() is quite a bit faster :) ------------------------------------------------------------------------ [2012-10-21 22:23:56] aneeska Description: ------------ $tar = new Archive_Tar($destination, true); $count = 0; foreach ($valid_files as $first) { $prefix = substr ($first, 0, (strrpos ($first, '/')+1)); $tar->addModify ($first, '', $prefix); $count++; echo "count = ".$count." prefix = ".$prefix." <br/>"; } Expected result: ---------------- I am expecting a tar file by the name $destination Actual result: -------------- I have 188 files to tar and this loop is painfully slow. It takes a long time to create the tar file. Is there anything wrong with the way I have written the code? ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19661&edit=1

« previous php.pear.bugs (#9332) next »