[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-recutils] Indexing plan
From: |
Jose E. Marchesi |
Subject: |
Re: [bug-recutils] Indexing plan |
Date: |
Thu, 24 May 2012 22:14:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
> Now I think it would be simpler to store all records in the index
file,
> so parsing the recfile wouldn't be needed. My other idea was to
store
> only the offsets in the recfile of their beginning, it would
require
> e.g. supporting seeks in parsers and keeping the file open while
the
> database is used.
>
> I much prefer the second option. To keep the file open must not be an
> issue.
Will think more what changes would be needed for this. Seekable parsers
would be also useful with lazy reading without indices.
Yes, definitely. An mmap-based solution could be a good option.
Oh, I see it was me who mentioned mmap first... well, I don't think that
mmap provides any significative advantage to prefer it over
fopen+fseek+ftell in this specific application...
--
Jose E. Marchesi http://www.jemarch.net
GNU Project http://www.gnu.org