u563694848ea@deneb.ucdavis.edu (0040;0000004804;0;250;141;) (02/20/89)
Hi, I'm looking for some information on speeding up normal AmigaDos reads. I've tried numerous different methods and these are the numbers I've gotten: 200K files read: Aztec fread: 22 secs Aztec fgetc: 14 secs AmiDos Read: 9 secs load program (to run) 4 secs! now, what I'd like to know is how can I read the file sequentially at the same speed it gets loaded to run? It probably isn't possible, but it sure would be nice ! :-) If I can't find a way to get the loading down in the 5-10 second range, I will probably try using the trackdisk device. Can anyone tell me how fast I can expect that to go? thanks in advance - Bruce Rogers (currently u563694848ea@deneb.ucdavis.edu)
jesup@cbmvax.UUCP (Randell Jesup) (02/21/89)
In article <3699@ucdavis.ucdavis.edu> u563694848ea@deneb.ucdavis.edu (Bruce Rogers) writes: > > Hi, I'm looking for some information on speeding up normal >AmigaDos reads. I've tried numerous different methods and these are the >numbers I've gotten: > >200K files read: > >Aztec fread: 22 secs >Aztec fgetc: 14 secs >AmiDos Read: 9 secs >load program (to run) 4 secs! Watch out: buffering can make reads appear to be faster than they are. If it loads (to run) from disk, not buffers, in 4 seconds, it must be off a hard disk (the theoretical max speed of trackdisk is 20K/sec, filesystem is slower). The reason your load is slower than LoadSeg() is probably buffer sizes (your read buffer). If you make 400 512byte requests from a hard disk, it's a lot slower than 1 200K request. LoadSeg() tries to use as large reads as it can, given the structure of the file. > If I can't find a way to get the loading down in the 5-10 >second range, I will probably try using the trackdisk device. Can anyone >tell me how fast I can expect that to go? Don't do it unless you absolutely must. With a harddisk, you REALLY don't need/want to be mucking with the trackdisk-level interface. Even with floppies, it's inadvisable - for example, if we make any changes to the layout the FS puts on the disk in 1.4, you'll break horribly. -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup
cmcmanis%pepper@Sun.COM (Chuck McManis) (02/23/89)
In article <3699@ucdavis.ucdavis.edu> (Bruce Rogers) writes: > Hi, I'm looking for some information on speeding up normal >AmigaDos reads. I've tried numerous different methods and these are the >numbers I've gotten: >Aztec fread: 22 secs >Aztec fgetc: 14 secs >AmiDos Read: 9 secs >load program (to run) 4 secs! > now, what I'd like to know is how can I read the file sequentially >at the same speed it gets loaded to run? Well, I am pretty sure that using stdio (aka fread fgetc) is going to be a lot slower than lower level reads (aka read) which will be slower than the straight dos read (aka Read). The only faster way to read something is to send the DOS packets yourself to the filesystem handler for the file you are reading. > If I can't find a way to get the loading down in the 5-10 >second range, I will probably try using the trackdisk device. Can anyone >tell me how fast I can expect that to go? Trackdisk will be a bit faster, but you will then have to understand the filesystem that is on the actual disk and thus worry about hash chains, file header blocks, file extension blocks etc. That's why you want to deal with the file handler rather than the raw disk, because you probably can't read the data any faster than the handler. Now the other option is to bypass the handler use trackdisk.device and not bother storing your data in any sort of well known way, just dump it a track at a time on the disk. Maybe we could get Commodore to support a "CSTM" (aka Custom) disk header that would be simply a signal to DOS not to try to validate the disk. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.