[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: jigdo



On Wed, Dec 03, 2003 at 11:53:13PM +0000, Steve McIntyre wrote:
> I've been poring over the jigdo source code, and I'm looking at the
> main loop in MkTemplate::scanImage(), especially the code where it
> compares the current hash against the hashes cached for known files. I
> don't know if you've thought of this (you may even have tried it, and
> it runs even slower), but when we first start looking for matches (a
> new file), could we not possibly short cut some of the work here by
> using the directory information that we have from the CD image itself?
[...]

IMHO all the iso9660-aware code would be difficult to write - see the 
following suggestion from my HACKING file, which I think is a better way to 
speed things up:

".rawtemplate" support:

  It is possible to make .jigdo creation for Debian CDs much faster
  by hacking mkisofs to support more direct output of .jigdo/.template
  files:

  First, change mkisofs to output not .iso format, but a special
  ".rawtemplate" (or whatever) format. That format is similar to the
  normal .template format, except that files are not referenced by
  their md5sum, but by their filename, and that none of the data is
  compressed. This should be quite simple, and thus the modifications
  to mkisofs should be few and small, making it more likely that such
  a patch is accepted by mkisofs upstream.

  Next, the .rawtemplate is piped into jigdo-file, which creates
  .jigdo and .template files as usual. However, due to its cache, it
  won't need to read the files' contents to know their md5sum, so the
  overall process is much faster.

Incidentally, Phil independently came up with something very similar.

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer     |  GnuPG key:
  | \/¯|  http://atterer.net  |  0x888354F7
  ¯ '` ¯



Reply to: