[Qgis-developer] memory layer performance while adding many features?

Victor Olaya volayaf at gmail.com
Wed Jul 29 00:09:12 PDT 2015


No idea why that might be happening....but hats off to you for such a
well documented report.

I had to say it :-)



2015-07-29 9:04 GMT+02:00 Raymond Nijssen <r.nijssen at terglobo.nl>:
> Dear developers, ;)
>
> A plugin of mine imports data from a gml file into a memory layer. Works
> fine for tiny gml files, but takes forever on huge ones. Sounds plausible
> maybe, but the relation is not linear.
>
> So I did did some tests and found out that reading and parsing the gml and
> creating the features always goes at the same speed of about 400 features a
> second (fps). But when adding these to my memory layer, the process slows
> down tremendously.
>
> I output the fps for every 1000 features and it gave me this graph:
>
> http://terglobo.nl/downloads/memory-layer-performance.png
>
> At the end of the importing process I'm processing just 3 features per
> second.
>
> Is this expected behaviour? Is a memory layer not meant for something like
> this? Or is this a bug?
>
> In the source code I found that for every feature I add to a memory layer
> the index is updated. Could that be inefficient?
>
> Hoping anyone can explain!
>
> Regards,
> Raymond
>
>
> --
> Terglobo
> Ampèrestraat 110
> 5223 CT 's-Hertogenbosch
> The Netherlands
> +31 6 25 31 49 83
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list