Also it's used only for layer editing, not drawing resolve how caching of geometries should work - currently every render, cached geometry of features is deleted and then saved again.use getNextFeature call that don't create new feature every time.
#QIMAGE ONE REVIEW HOW TO#
how to propagage easily transparency settings?.where should be transparent pen created? in QgsVectorLayer, classes derived from QgsRenderer or in QgsSymbol?.pen with transparency should be initialized only once, not every time it comes to drawing.after rendering QImage is converted to QPixmap to get drawing in on screen faster.
This means that QPixmap should be faster with drawing itself on screen, but QImage is faster for offscreen drawing
Here are some areas that might be optimized to speed up the rendering. need to benchmark also Postgres and GRASS provider for comparison.test was done by changing getNextFeature draw in QgsVectorLayer::draw().Test 4: getting features with/without attributes it seems that rendering call is very fast - most of the time is spent with feature retreival and preparing for drawing.QImage is MUCH better with antialiasing turned on.QImage gives slightly better results without antialiasing.QGLPixelBuffer doesn't bring better performance as I expected, even doesn't support antialiasing.I have experimentally changed rendering to QImage instead of QPixmap, there's no option to change it at run-time.Test 3: painting engines and antialiasing results vary greatly depending on SRS being projected to.on the fly projection is big performance killer.Test 2: on the fly projection Projections turned off Next tests were done with OGR provider (with shapefile driver), other providers give similar results with the same difference as above. First draw of newly loaded GRASS layer takes cca double time to complete (is there any caching happening?).Test 1: Vector provider speeds OGR (shapefile) Tests were done on debug version of QGIS with no optimizations. These should just give an overview of the performance problems. Map area in QGIS was about 900x530 pixels. I've tested on my AMD Athlon XP (1.83GHz) computer, with no CPU-intensive applications running. Values I present here are averages of the values I have measured by doing refresh of map canvas while having the whole layer shown. Such greater number of features can show where are the greater speed issues. Benchmarks ¶įor testing purposes I took a line vector layer that contains nearly 35 000 features (a roadmap). I haven't researched drawing of raster layers so far. In following section you can find some benchmarks I have done on vector rendering, at the end there are several optimizations I think that might be useful to implement.Īrea I've been studying was mainly drawing vector layer containing lines, but some optimizations should improve rendering speed in general. Therefore we should try to optimize it as much as possible. Performance of rendering routines is quite crucial for a graphical application like QGIS.