[Qgis-developer] patch for qgsrasterlayer.cpp

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Fri Sep 28 11:07:34 EDT 2007


Hi Peter and Tim,

While sitting in the train, I plaied a bit around with the methods 
QgsRasterLayer::drawPallettedMultiBandColor and 
QgsRasterLayer::drawMultiBandColor. I think that some multiplications and 
comparison in the inner loop, which is executed appr. 800000 times during 
each redraw, can be avoided or moved outside the loop. Especially, 
QgsRasterLayer::drawPallettedMultiBandColor was much faster on my PC 
afterwards.

Attached the patch. Please review and test, if I didn't break any existing 
functionality.

Regards,
Marco



-- 
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee
marco.hugentobler at karto.baug.ethz.ch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qgis_raster_speedup.diff
Type: text/x-diff
Size: 7060 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/qgis-developer/attachments/20070928/3062066d/qgis_raster_speedup.bin


More information about the Qgis-developer mailing list