Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!tcdcs!maths.tcd.ie!ecarroll From: ecarroll@maths.tcd.ie (Eddy Carroll) Newsgroups: comp.sys.amiga.programmer Subject: Re: zoo? why does it grind the disk? Keywords: zoo Message-ID: <1991Apr8.232658.1589@maths.tcd.ie> Date: 8 Apr 91 23:26:58 GMT References: <1991Apr6.170351.13111@sunee.waterloo.edu> Organization: Dept. of Maths, Trinity College, Dublin, Ireland. Lines: 40 In article <1991Apr6.170351.13111@sunee.waterloo.edu> avadekar@sunee.waterloo.edu (Ashok Vadekar) writes: >In article robtu@itx.isc.com (Rob Tulloh) writes: >> >>I have noticed that using zoo with files on the command line causes >>it to grind the disk drive several minutes before it really gets down >>to adding files. However, if I pipe the files to zoo, it adds them >>right away. What gives? >The code (which is originally UNIX based) does some truely horrendous >things. Zoo has to position itself in the zoo file to skip past each >existing entry. Since a compressed file has a header that states the >size, zoo performs a fseek() to position itself at the start of the next >record (compressed file). Unfortunately, all fseek() calls are made >with respect to the start of the file (instead of relative to the current >file postion). This means going back to the start of the file and scanning >forward again, past the point you were already at, and on to the start of >the next header. > >Ashok Vadekar This is true, but the real reason for the delay is that the original Amiga version of Zoo called Aztec's "expand wildcards" routine for every file on the command line, even if the filename didn't contain any wildcard characters. So, a command line like: zoo a zoofile file1 file2 file3 file4 file5 file6 ended up scanning your current directory 6 times. If you had any number of files at all in your directory, this took forever. I believe the latest version of Zoo (V2.01) fixes this problem. I did a patch for Zoo 2.0 that fixes the problem as well, a while back. Other than that, using piped filenames is the way to go. Eddy -- Eddy Carroll ----* Genuine MUD Wizard | "You haven't lived until ADSPnet: cbmuk!cbmuka!quartz!ecarroll | you've died in MUD!" Internet: ecarroll@maths.tcd.ie | -- Richard Bartle