Il 03/08/2018 21:50, Simon Slavin ha scritto:
> On 3 Aug 2018, at 8:04pm, Abramo Bagnara <abramo.bagn...@bugseng.com> wrote:
> 
>> Some queries will need to extract the whole file, while other queries
>> will need to extract the text for a range of lines.
> 
> Can you give us an idea of how many lines you expect per text file ?  Minimum 
> and maximum for 90% of the files would be good.

They are (possibly preprocessed) source files. Then the size is not
known, as I wrote I assume it is in the range 1KB, 20MB, with most cases
under 1MB.

> 
> Also, in whatever programming language you're using, it is easy/fast or 
> difficult/slow to locate lines 21 to 41 of a 100-line text string ?

The language is C++. Without caching it needs a linear scan of bytes
from the beginning counting newlines for every lines range query. With
caching this counting can be done once and saved somewhere.

The lines will be served to an infinite scroll web app, so the retrieval
speed is important to reduce the latency.

-- 
Abramo Bagnara
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to