KTar patch to fix speed problems with tar ioslave

Justin Hibbits jrh29 at po.cwru.edu
Sun Feb 8 19:31:26 CET 2004


On Sun, Feb 08, 2004 at 07:10:11PM +0100, Jan Schaefer wrote:
> Hi,

Hi :)

<snip>
> Instead of applying the compression filters to the actual device that is used 
> by KTar, I use the compression filters to decompress the tar file and store 
> the decompressed file in a temporary file. This temporary file is then used 
> as the device for KTar. Now it is not necessary anymore to walk through the 
> compression filter each time a file is extracted from the archive.
> 
> The solution increases the extraction speed of tar.bz2 (and tar.gz) files 
> dramatically. It takes now about two minutes to extract the whole 11MB Qt 
> tar.bz2 on my computer.
> 
> However, there is a little drawback because it needs disk extra space for the 
> temporary file. But I cannot think of better solution.

I admit that I haven't read through much of the ioslave code at all, so just
going off what you've written.

Why don't you instead of untarring the entire file (which it appears you've
done), extract the directory itself, and move each file over through the
ioslave?  This way, you're not using much more disk space (only enough to hold
the directory, hopefully it's on the same partition as the target, or there's
enough space in /tmp or wherever), and it's just as fast.

If that's what you do, then ignore this, since I don't know much about the
design of the ioslaves, but it does appear that you're decompressing the entire
file/device, and if you only want a single directory, you need only to extract
that path from the archive, so this would be a little faster.

Please no flames if I missed something.

-Justin

-- 
Registered Linux user 260206

"One World, One Web, One Program" |   ASCII Ribbon            /"\
    - Microsoft Promo Ad          |   Campaign Against        \ /
"Ein Volk, Ein Reich, Ein Fuhrer" |   HTML email and           x
    - Adolf Hitler                |   proprietary attachments / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 2311 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-optimize/attachments/20040208/452a435e/attachment.pgp


More information about the Kde-optimize mailing list