[Qgis-developer] memory usage by attribute table

Tim Sutton tim at linfiniti.com
Fri Jul 25 03:07:28 EDT 2008


Hi Tom

Using qt4's 'interview (model/view)' framework is probably a good way
to go here too. I believe the provider api has the necessary methods
to allow us to implement this. Martin has made an experimental python
of this once (perhaps its used in 'BetterTable' python plugin?) and I
have a halfway implemented C++ model implemented somewhere on my hard
disk. In other applications I have found that using model / view
implementation offers a significant performance benifit aside from
memory usage considerations.

Regards

Tim

2008/7/24 Tom Elwertowski <telwertowski at comcast.net>:
> Tara Athan wrote:
>>
>> I frequently use a large polygon shapefile with +50,000 records in a dbf
>> file of 87Mb, which would crash v0.10, so that was the first thing I checked
>> in my new build.
>> QGIS v0.11 is able to open the file (congratulations).
>
> This is probably due to upgrading from Qt3 to Qt4 table classes.
>
>> But when I open it in QGIS v0.11, I see a memory hit of 1.2GB, around 13x
>> the size of the file.
>
> I would expect at hit of at least 3x to 4x. 13x seems a bit high but not
> totally unexpected since we are using generic table classes.
>
> A custom data storage class can be written for Qt4 tables. It appears that
> this would be worthwhile for large files.
>
> Another possible optimization for Qt4 tables is to load only the data
> visible on the screen. This can only be done for formats which support
> random access, however. SHP files qualify but other QGIS formats do not. If
> we go this route, we then need to maintain two table data storage classes:
> one for formats which support random access and another for formats which
> don't.
>
> I removed the Qt3 classes so that QGIS can be built as a 64bit Mac
> application. After QGIS 1.0, the QGIS community should compare and
> prioritize this and other optimizations and new features for QGIS.
>
> Tom
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Tim Sutton
QGIS Project Steering Committee Member - Release Manager
Visit http://qgis.org for a great open source GIS
openModeller Desktop Developer
Visit http://openModeller.sf.net for a great open source ecological
niche modelling tool
Home Page: http://tim.linfiniti.com
Skype: timlinux
Irc: timlinux on #qgis at freenode.net


More information about the Qgis-developer mailing list