[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | AMIGA NOTES |
Notice: | Join us in the *NEW* conference - HYDRA::AMIGA_V2 |
Moderator: | HYDRA::MOORE |
|
Created: | Sat Apr 26 1986 |
Last Modified: | Wed Feb 05 1992 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 5378 |
Total number of notes: | 38326 |
1366.0. "A 'C' Question" by LEDS::HAGER (Clyde Hager DTN 291-7221) Fri Apr 22 1988 18:21
Calling all Amy 'C' hackers (and professionals too), I have a
software question. Can anyone help with this one? Yes. 8^)'
There are, say, twenty to thirty files in this software package.
One file is the executable program, written in c, which controls
the entire program. At selected times, this program will read
any of the other files off the disk and do something with it.
As an aside, the files are pictures, sounds, and text displays.
All of these data files are in IFF format.
The problem is this: When run off a floppy, it takes several
seconds to search the directory and load a data file. This is
not conducive to a smoothly flowing program.
One option I've been considering is: Combine all of the IFF files
into one very large IFF file, creating an index that points to the
start of each piece, so that the directory search is just a one
block read, the index is one read, and the seek takes you right to
the IFF block you want in one more read, thus minimizing the reads.
The question is:
Will this do what I expect, i.e. minimize the disk accessing?
Or an alternate question: Any better ideas out there?
If nothing else, maybe we (Amy C programmers) will all learn something!
advTHANKSance,
Clyde
T.R | Title | User | Personal Name | Date | Lines |
---|
1366.1 | | AIKITS::WISNER | | Sat Apr 23 1988 18:40 | 11 |
| Have you thought of using Addbuffers (the AmigaDOS command?)?
ADDBUFFERS n
Reduces disk access time by added sector cache buffers.
n is the number of buffers added. Try 25 initially. 500 bytes per
buffer is used up.
-Paul
|
1366.2 | Mmmmmmmmmm, I don't think so. | LEDS::HAGER | Clyde Hager DTN 291-7221 | Mon Apr 25 1988 18:09 | 12 |
| Re: .1
> Have you thought of using Addbuffers (the AmigaDOS command?)?
Thanks for the reply, Paul. Let me clarify that this software
package is being put on a floppy for wide distribution. I don't
think it would be right to put an AddBuffers in there for that
reason. Wouldn't you agree that people would like to know if
their available memory was being reduced in that way? As I
understand it, once you use AddBuffers, you can't reduce the
number of buffers without a reboot, the RAM is taken for good.
Clyde
|
1366.3 | My Opinion | MLNVMS::MILOS | Milos Roberto TSC Milan | Tue Apr 26 1988 04:58 | 12 |
| I dont' think you'll save much time putting all the data in a
single file.
The time to find a specific file (if you already know its name)
is very short.
I think that a good way to do what you need is to keep in memory
the list of the filenames you need and then open the required file
without have to read its name from an external file, and then
open it.
Hope this helps....
Regards,
Roberto.
|