Skip to content
Permalink
Browse files

Optimize simple line drawing when without data-defined properties

20% speed improvement when drawing 1m linestrings (4points each) from memory layer
  • Loading branch information
wonder-sk committed Oct 3, 2014
1 parent fbbea90 commit d8ce7dac76419998066ced05287cc96f293f21ca
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/symbology-ng/qgslinesymbollayerv2.cpp
@@ -452,6 +452,9 @@ QgsSymbolLayerV2* QgsSimpleLineSymbolLayerV2::createFromSld( QDomElement &elemen

void QgsSimpleLineSymbolLayerV2::applyDataDefinedSymbology( QgsSymbolV2RenderContext& context, QPen& pen, QPen& selPen, double& offset )
{
if ( mDataDefinedProperties.isEmpty() )
return; // shortcut

//data defined properties
double scaledWidth = 0;
QgsExpression* strokeWidthExpression = expression( "width" );

0 comments on commit d8ce7da

Please sign in to comment.
You can’t perform that action at this time.