[DGD] File access question
Kurt Nordstrom
kurt at blar.net
Sat Jul 14 02:03:01 CEST 2007
Hmmm, I think I'd have to go with the indexed method, because I want to be
able to edit the source file in a text editor, as opposed to using a coded
solution to edit the entries. I guess I'll just have some kind of script
to run to generate a new index each time I edit it.
> The trick to more quickly read in just part of a file is to know where
> to
> seek to. Two simple-ish ways to do that:
>
> * Store an index of line starts so that you can quickly seek to the
> beginning
> of a line (N). This requires keeping an index up to date, and you have to
> load
> it before you can read the file.
> * Have fixed-length lines. Then you don't need an index, you can just
> do a
> multiply to find the start offset.
>
More information about the DGD
mailing list