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); } }
Is there any other information or work that I can do to speed up getting this fix into portage? Please advise.
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.