[Liblas-devel] Cached Reader bottleneck
Gary Huber
gary at garyhuberart.com
Thu Oct 21 16:57:19 EDT 2010
Mateusz Loskot wrote:
>
> I think we should extract a lightweight LASHeaderReader from LASReader
> for uses cases like the above, to avoid setting up complete reading
> engine if user wants to get header only.
I absolutely agree. In cases where the index is stored in a separate
file I am initializing two Readers - one to read the index, which is
only a header but has the number of points specified in it even though
they aren't in the index file, and one Reader for the file with the
actual point data. So right there - two huge arrays one of which will
never be used at all.
In some cases when filtering with the index, it won't even be necessary
to read point data and in most cases not necessary to read any more than
a small portion of the points. Only when building the index is reading
the full suite of points necessary and then most of them only get read
once. Caching the points is not necessary for index building in my
opinion but I'd be happy to test it both ways if anyone wants to
implement the optional way of init'ing a Reader.
-Gary
More information about the Liblas-devel
mailing list