MACSCRPT Archives

May 2003

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Walter Ian Kaye <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 7 May 2003 06:52:43 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (25 lines)
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

ATOM RSS1 RSS2