Hi Jeremy,

There should not be a noticable delay if you do not use them (one
attempt to open per directory displayed), but may be for big
directories as the file is sequentially searched for each filename
displayed (as the file is unsorted and may or may not contain a
description I"m not sure how to avoid this).

       I'm not familiar with the exact constraints that apply to
FreeCOM, but the following might be an optimization that performs
better if there is enough RAM free and the same if you don't.

       What I'd suggest is you use a binary search tree (with the key
being the filename of course); the trick being that you just use up
all the RAM available to build the tree, and if you run out before you
finish reading the descript.ion file, you remember the file position
of the first entry you couldn't add to your tree so that when you are
looking up a description for a physical file you found on disk, if you
don't find it in the binary search, you can then do a linear scan of
the remainder of the file.

       I think this would be a good design because it should perform
well if you have enough memory/the descript.ion file isn't too big,
but it will still work if there's not enough memory.

       Of course I don't know if code size might be a concern for you
guys and adding the above would be a problem!  Apologies if these
kinds of constraints are documented somewhere - I haven't gotten
around to reading all the documentation yet but once I have I'm hoping
I can contribute with regards to coding.  Any suggestions of some
small things that need to be done that are maybe the kind of thing
that the main developers don't have time for or feel is below them -
the kind of work that at my work we'd give to an intern? :)

Thanks in advance,
David


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to