Re: FreeCom and 4DOS descript.ion files

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: FreeCom and 4DOS descript.ion files

David O'Shea
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freedos-devel
Reply | Threaded
Open this post in threaded view
|

Re: Re: FreeCom and 4DOS descript.ion files

Kenneth J. Davis
David O'Shea wrote:

...

>        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.

Definitely worth considering.  What I would really like to hear is from
people who actually use these files about the normal size (how many
entries and usual line lengths) and just a rough impression if the
implemented method is noticeably slow or even worthwhile?


>
>        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? :)

we [at least me] appreciate any and all help, whether small patch,
documentation suggestion, or just testing.

>
> Thanks in advance,
> David

Thank you for the suggestion,
Jeremy





-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
Freedos-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freedos-devel