[QGIS Commit] [qgis/QGIS] 7d8d1d: Optimize simple marker rendering perfomance

GitHub noreply at github.com
Mon Dec 9 08:29:53 PST 2013


  Branch: refs/heads/master
  Home:   https://github.com/qgis/QGIS
  Commit: 7d8d1d6d06cd40f43bcb47f3c741acbba1fb0fa3
      https://github.com/qgis/QGIS/commit/7d8d1d6d06cd40f43bcb47f3c741acbba1fb0fa3
  Author: Yauhen Kharuzhy <jekhor at gmail.com>
  Date:   2013-12-09 (Mon, 09 Dec 2013)

  Changed paths:
    M src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
    M src/core/symbology-ng/qgsmarkersymbollayerv2.h
    M src/core/symbology-ng/qgssymbollayerv2.cpp
    M src/core/symbology-ng/qgssymbollayerv2.h

  Log Message:
  -----------
  Optimize simple marker rendering perfomance

expression( "..." ) call create QString object at every invocation. For
layers with simple markers this overhead take upto 10% of rendering time.

Move expression finding to startRender() method.

Signed-off-by: Yauhen Kharuzhy <jekhor at gmail.com>


  Commit: 381efba4b3f8c3ca93aa8c6f1e70470892e08b4a
      https://github.com/qgis/QGIS/commit/381efba4b3f8c3ca93aa8c6f1e70470892e08b4a
  Author: Yauhen Kharuzhy <jekhor at gmail.com>
  Date:   2013-12-09 (Mon, 09 Dec 2013)

  Changed paths:
    M src/core/qgscoordinatetransform.cpp

  Log Message:
  -----------
  Eliminate creating of unused QString objects in transformCoords

Every call of transformCoords() Qstring dir object is created. It uses
only for output information about errors, so move its creation to error
handling block.

Perfomance gain is ~7%.

Signed-off-by: Yauhen Kharuzhy <jekhor at gmail.com>


  Commit: 221263db95fc1c293a7d35c4760033934abb3e1b
      https://github.com/qgis/QGIS/commit/221263db95fc1c293a7d35c4760033934abb3e1b
  Author: Yauhen Kharuzhy <jekhor at gmail.com>
  Date:   2013-12-09 (Mon, 09 Dec 2013)

  Changed paths:
    M src/core/qgsclipper.cpp
    M src/core/qgsclipper.h

  Log Message:
  -----------
  Properly reserve place for arrays in line and polygon clipping routines

A QVector::clear() method completely reinitializes the object. Calling
a QVector::reserve() before clear() is useless and causes big overhead at
array append operations.

Give ~6% perfomance gain.

Signed-off-by: Yauhen Kharuzhy <jekhor at gmail.com>


Compare: https://github.com/qgis/QGIS/compare/93e0f3d88f0b...221263db95fc


More information about the QGIS-commit mailing list