ufz/ogs — pull request #164 by rinkk (2013-07-09 10:48:54+00:00)
Title: Tree model optimisation

Some small changes to the tree-models for geometry and meshes.

Currently tree model/view construction takes longer than reading and constructing the actual mesh. The string tweaks and memory allocations in this PR make everything a bit faster. Some examples:
MshModel: Test mesh with 600.000 elements - took ~13 secs, now takes ~9.2 secs
GeoTreeModel: Test geometry with 450.000 points - took ~8 secs, now takes ~6.5 secs

Note take 5-6 secs for the given test mesh are used up for int to string conversion via QString::number(). I tried various other methods (QString.arg(), string streams, etc) and nothing was faster. Also, documentation and reality are not always right. String concat via append() should be slower than via "+" but that was not always true. To the best of my knowledge the current config is the fastest on my machine. If anyone sees further potential for making things faster that'd be more than welcome.