qgis/Quantum-GIS — pull request #510 by matthias-kuhn (2013-04-08 19:15:55+00:00)
Title: [FIX #7533] Field calculator is slow

Set the QgsDistanceArea only once and not for every loop cycle.
QgsCoordinateReferenceSystem::loadFromDb takes very long.

Please review, if it is necessary to set the field calculator within every iteration.

Note:
Caching of CRS could be an improvement of which various parts of qgis could benefit. There are probably a handful of CRS (if not only 1) which are needed within a qgis session and loading them only once instead of dozens of times could help to save CPU cycles and I/O.