[Liblas-devel] Cached Reader bottleneck

Mateusz Loskot mateusz at loskot.net
Fri Oct 22 11:06:58 EDT 2010


On 22/10/10 13:18, Howard Butler wrote:
> On Oct 21, 2010, at 3:57 PM, Gary Huber wrote:
>> 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.
>
> I think it would be sufficient to have both the CachedReaderImpl and
> the regular ReaderImpl make sure that they don't do any big
> initialization of things like the mask arrays until they try to read
> their first point.  I will take this as a task for next week.

Hobu,

Your solution would work for me very well.
No need to have separate reader then.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org


More information about the Liblas-devel mailing list