Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140727 - app-cdr/cdrtools - isoinfo -x is very slow (patch)
Summary: app-cdr/cdrtools - isoinfo -x is very slow (patch)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Lowest minor
Assignee: Gentoo Optical Media project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-16 22:13 UTC by David Sainty
Modified: 2006-12-02 19:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Sainty 2006-07-16 22:13:48 UTC
isoinfo extracts files at the painful rate of 1 sector at a time.  This patch speeds up file extraction significantly by using a much larger buffer.

[Note: other bugs remain, like not checking the return value from read().  I've addressed just the one issue.]

I've also submitted this patch to the cdrtools author (no response as yet).

--- cdrtools-2.01.01/mkisofs/diag/isoinfo.c.orig        2005-05-16 02:21:05.0000
00000 +1200
+++ cdrtools-2.01.01/mkisofs/diag/isoinfo.c     2006-07-15 18:33:06.000000000 +1
200
@@ -644,7 +644,7 @@
        struct iso_directory_record *idr;
 {
        int             extent, len, tlen;
-       unsigned char   buff[2048];
+       unsigned char   buff[204800];
 
 #if    defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__EMX__) || defi
ned(__DJGPP__)
        setmode(fileno(stdout), O_BINARY);
@@ -654,16 +654,15 @@
        len = isonum_733((unsigned char *)idr->size);
 
        while (len > 0) {
-#ifdef USE_SCG
-               readsecs(extent - sector_offset, buff, ISO_BLOCKS(sizeof (buff))
);
                tlen = (len > sizeof (buff) ? sizeof (buff) : len);
+#ifdef USE_SCG
+               readsecs(extent - sector_offset, buff, ISO_BLOCKS(tlen));
 #else
                lseek(fileno(infile), ((off_t)(extent - sector_offset)) << 11, S
EEK_SET);
-               tlen = (len > sizeof (buff) ? sizeof (buff) : len);
                read(fileno(infile), buff, tlen);
 #endif
                len -= tlen;
-               extent++;
+               extent += ISO_BLOCKS(tlen);
                write(STDOUT_FILENO, buff, tlen);
        }
 }
Comment 1 David Sainty 2006-08-24 23:45:37 UTC
Is there any other information or work that I can do to speed up getting this fix into portage?  Please advise.
Comment 2 Lars Weiler (RETIRED) gentoo-dev 2006-12-02 19:33:03 UTC
I don't concentrate so much on fixing cdrtools.  Can you test with cdrkit and if the patch is still needed, report it to the cdrkit-maintainers.  They are more open in accepting patches.

I consider this bug as WONTFIX for Gentoo.