qgis/Quantum-GIS — pull request #582 by ccrook (2013-05-10 01:57:54+00:00)
Title: Delimited text provider indexing efficiency improvements.

Efficiency improvements.

Adds capabilities
SelectAtId
CreateSpatialIndex

This uses line number as an index. Allows jumping to a line number
without interpreting all intermediate records, so much more efficient.
Also retains the current record in a buffer, so successive requests for
the same record do not require rereading the file.

With index available have also added indexing of subsets and optional
creation of spatial index.

Note: did try using QTextStream.pos to build a random access index -
this was incredibly slow. Have found using line based index is
reasonably fast even on quite large (50+Mb) text files.