At 09:34a -0400 05/07/2003, Franz Walter Klein didst inscribe upon an
electronic papyrus:
>Hello AS Gurus,
>
>after years of silence I'm back to the list with a question: I run a web*
>server and need to put up a html form that is prefilled with some data. I
>need some kind of cgi that performs a lookup within a presorted text file
>and retrieves the line matching the search string entered by the remote
>user. The text file is sorted by that search string and may contain up to
>500.000 lines and eventually more. Therefore the code needs to be efficient
>to guarantee short response times.
What is the format of the file? Fixed-length or variable-length lines?
Perhaps you could maintain an index file which is smaller and thus
can be searched faster. An index to a line number would allow fastest
access to fixed-length lines because then you could calculate the
byte position and read the record directly.
Umm, is this Web* server running on OS X (in which case you could
leverage Perl) or on MacOS?
-boo