Bug report #18635

long rendering (i.e. 12sec) zoomed into a simple line layer when drop shadow effect enabled

Added by Mathieu Pellerin - nIRV over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Low
Assignee:Nyall Dawson
Category:Symbology
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:26523

Description

I've just noticed that, when well zoomed into the simplest of line datasets, the rendering will take forever to finish when the layer has a drop shadow effect enabled.

A simple test project is attached to this ticket to see the slow rendering.

GDB's where output when pausing the execution while the rendering takes place:

#0  0x00007ffff5ea18d1 in QgsImageOperation::StackBlurLineOperation::operator()(unsigned int*, int, int) (this=0x7fff3cbf7920, startRef=0x7ffdce4a624c, lineLength=10333, bytesPerLine=82728) at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgsimageoperation.cpp:622
#1  0x00007ffff5ea8572 in QgsImageOperation::ProcessBlockUsingLineOperation<QgsImageOperation::StackBlurLineOperation>::operator()(QgsImageOperation::ImageBlock&) (this=0x7fff24006e98, block=...) at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgsimageoperation.h:279
#2  0x00007ffff5ea75f9 in QtConcurrent::MapKernel<QList<QgsImageOperation::ImageBlock>::iterator, QgsImageOperation::ProcessBlockUsingLineOperation<QgsImageOperation::StackBlurLineOperation> >::runIteration(QList<QgsImageOperation::ImageBlock>::iterator, int, void*) (this=0x7fff24006e60, it=...)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentmapkernel.h:69
#3  0x00007ffff5ea7698 in QtConcurrent::MapKernel<QList<QgsImageOperation::ImageBlock>::iterator, QgsImageOperation::ProcessBlockUsingLineOperation<QgsImageOperation::StackBlurLineOperation> >::runIterations(QList<QgsImageOperation::ImageBlock>::iterator, int, int, void*) (this=0x7fff24006e60, sequenceBeginIterator=..., beginIndex=6, endIndex=7) at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentmapkernel.h:78
#4  0x00007ffff5ea8114 in QtConcurrent::IterateKernel<QList<QgsImageOperation::ImageBlock>::iterator, void>::forThreadFunction() (this=0x7fff24006e60)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentiteratekernel.h:256
#5  0x00007ffff5ea7462 in QtConcurrent::IterateKernel<QList<QgsImageOperation::ImageBlock>::iterator, void>::threadFunction() (this=0x7fff24006e60)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentiteratekernel.h:218
#6  0x00007fffeb5aeadd in QtConcurrent::ThreadEngineBase::startBlocking() () at /usr/lib/x86_64-linux-gnu/libQt5Concurrent.so.5
#7  0x00007ffff5ea3230 in QtConcurrent::ThreadEngine<void>::startBlocking() (this=0x7fff24006e60)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentthreadengine.h:154
#8  0x00007ffff5ea2d55 in QtConcurrent::ThreadEngineStarter<void>::startBlocking() (this=0x7fff3cbf7780)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentthreadengine.h:257
#9  0x00007ffff5ea4f65 in QtConcurrent::blockingMap<QList<QgsImageOperation::ImageBlock>, QgsImageOperation::ProcessBlockUsingLineOperation<QgsImageOperation::StackBlurLineOperation> >(QList<QgsImageOperation::ImageBlock>&, QgsImageOperation::ProcessBlockUsingLineOperation<QgsImageOperation::StackBlurLineOperation>) (sequence=..., map=...) at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentmap.h:193
#10 0x00007ffff5ea4639 in QgsImageOperation::runBlockOperationInThreads<QgsImageOperation::ProcessBlockUsingLineOperation<QgsImageOperation::StackBlurLineOperation> >---Type <return> to continue, or q <return> to quit---
(QImage&, QgsImageOperation::ProcessBlockUsingLineOperation<QgsImageOperation::StackBlurLineOperation>&, QgsImageOperation::LineOperationDirection) (image=..., operation=..., direction=QgsImageOperation::ByColumn) at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgsimageoperation.cpp:173
#11 0x00007ffff5ea36f6 in QgsImageOperation::runLineOperation<QgsImageOperation::StackBlurLineOperation>(QImage&, QgsImageOperation::StackBlurLineOperation&) (image=..., operation=...) at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgsimageoperation.cpp:113
#12 0x00007ffff5ea1687 in QgsImageOperation::stackBlur(QImage&, int, bool) (image=..., radius=13, alphaOnly=false)
    at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgsimageoperation.cpp:589
#13 0x00007ffff5ead222 in QgsShadowEffect::draw(QgsRenderContext&) (this=0x555558cb24f0, context=...)
    at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgsshadoweffect.cpp:48
#14 0x00007ffff5ea9742 in QgsPaintEffect::render(QPicture&, QgsRenderContext&) (this=0x555558cb24f0, picture=..., context=...)
    at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgspainteffect.cpp:114
#15 0x00007ffff5e9a905 in QgsEffectStack::draw(QgsRenderContext&) (this=0x555558e3a2c0, context=...)
    at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgseffectstack.cpp:100
#16 0x00007ffff5ea9742 in QgsPaintEffect::render(QPicture&, QgsRenderContext&) (this=0x555558e3a2c0, picture=..., context=...)
    at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgspainteffect.cpp:114
#17 0x00007ffff5ea9935 in QgsPaintEffect::end(QgsRenderContext&) (this=0x555558e3a2c0, context=...)
    at /home/webmaster/dev/cpp/QGIS/src/core/effects/qgspainteffect.cpp:151
#18 0x00007ffff63e83fd in QgsVectorLayerRenderer::render() (this=0x5555589b7e40) at /home/webmaster/dev/cpp/QGIS/src/core/qgsvectorlayerrenderer.cpp:251
#19 0x00007ffff61d9257 in QgsMapRendererParallelJob::renderLayerStatic(LayerRenderJob&) (job=...)
    at /home/webmaster/dev/cpp/QGIS/src/core/qgsmaprendererparalleljob.cpp:256
#20 0x00007ffff61dac0a in QtConcurrent::FunctionWrapper1<void, LayerRenderJob&>::operator()(LayerRenderJob&) (this=0x5555597ab268, u=...)
    at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentfunctionwrappers.h:83
#21 0x00007ffff61da943 in QtConcurrent::MapKernel<QList<LayerRenderJob>::iterator, QtConcurrent::FunctionWrapper1<void, LayerRenderJob&> >::runIteration(QList<LayerRenderJob>::iterator, int, void*) (this=0x5555597ab230, it=...) at /usr/include/x86_64-linux-gnu/qt5/QtConcurrent/qtconcurrentmapkernel.h:69

long.zip (18.2 KB) Mathieu Pellerin - nIRV, 2018-04-05 05:46 AM

History

#1 Updated by Mathieu Pellerin - nIRV over 6 years ago

Few additional details:
- when the line layer all fits within the canvas, rendering is fast;
- when you zoom in into one or two lines, the rendering gets slower, and slower, and slower;
- if you disable enable the "clip feature to canvas" option, the rendering becomes super fast again.

#2 Updated by Mathieu Pellerin - nIRV over 6 years ago

  • Resolution set to invalid
  • Priority changed from Normal to Low

Blah, so turns out the problem was that the clip feature to canvas option was disabled, creating very large image areas to apply a blur onto.

Closing.

#3 Updated by Nyall Dawson over 6 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF