home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: sparky!uunet!gatech!psuvax1!uxa.ecn.bgu.edu!garrot.DMI.USherb.CA!famus2
- From: famus2@DMI.USherb.CA (Projet2 Famus)
- Subject: Re: Fast floppy writing techniques
- Message-ID: <BuFK8q.71s@DMI.USherb.CA>
- Sender: usenet@DMI.USherb.CA (Pour courrier Usenet)
- Nntp-Posting-Host: roselin
- Organization: Universite de Sherbrooke -- departement de Mathematiques et d'Informatique
- Date: Fri, 11 Sep 1992 20:14:50 GMT
- Lines: 38
-
- >>Hi, I was wondering if anyone has C code for fast file writing to floppies.
- >>The application that I'm writing compresses the data before writing to disk,
- >>but the bottleneck is the floppy. I'm currently trying to optimize disk
- >>writing by using a technique similar to XCOPY, but if I had code that
- >>resembled XCOPY already written that might help me meet my deadline.
-
- >>email: famus2@dmi.usherb.ca
-
- >Sorry, XCOPY gets its speed from cashing. The basic idea is that copy
- >will read a sector and then write a sector( or is that a few sectors).
- >Anyway it takes a lot of time to move from the read postion to the
- >write position, back to read the next sector and move to write it ....
-
- >Xcopy will read in one or more files at once, the theror being that one
- >sector in a file tends to follow the other, then write them all out at
- >once.
-
- >If you want to play at the BIOS level (don't do this at home kids) you
- >can read/ write entire tracks at once.
-
- Yeah, I know about taking it a track at a time, it's a little too
- involved for my timeframe.
-
- XCOPY gains speed (IMO) from batching together READS (until buffer is
- full) and writes (until buffer is empty). Caching is not quite
- what XCOPY is doing. I have not disassembled it (no good disasm).
-
- An interesting idea I received from bobk@bridge2.NSD.3Com.COM
- (Bob Konigsberg) is to open, seek til end -1, then write last byte
- then seek to beginning, then to write whole file out. I thought
- the idea was so interesting that I posted it for all to see.
-
- Thanks Bob!
-
- Steven Woolgar
- CHUS-FAMUS
- e-mail: famus2@dmi.usherb.ca
-
-