<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>Thank you both Julien and Nyall for your comprehensive replies.</p>
<p>Yes - I also have the impression that the buffer algorithm isn't interruptible during dissolving.</p>
<p>My model contains a number of complex buffer, dissolve and difference algorithms that take quite some time to execute.</p>
<p>Good to hear from Nyall that the situation could be improved, if there would be funding. I'll think about it, but I fear it is not yet on the top of the priority list of my employer. So far, the processing models haven't been used much.</p>
<p>Thanks to both of you,</p>
<p>Andreas</p>
<p id="reply-intro">On 2020-08-13 11:40, Nyall Dawson wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">On Thu, 13 Aug 2020 at 19:28, Julien Cabieces<br /><<a href="mailto:julien.cabieces@oslandia.com">julien.cabieces@oslandia.com</a>> wrote:
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><br /><br />Hi<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Hi,<br /><br />I am working with processing models these days - and depending on the<br />data amounts, the algorithms run quite long.<br /><br />I noticed that although there is a "Cancel" button, this button has no<br />effect during the execution of one single algorithm that takes a long<br />time. Only after the execution of this single algorithm, then the<br />subsequent algorithms are cancelled. So if, e.g. a buffer algorithm<br />takes 5 minutes to execute and it is just one part of the whole model,<br />then if the user presses cancel during the execution of this buffer<br />algorithm, then he has to wait until the buffer algorithm finishes. Is<br />this observation correct?</blockquote>
<br />No, you can interrupt an algorithm during its execution, but each algorithm<br />has to check if the user has canceled regularly during the<br />execution (here for the buffer algorithm for instance:<br /><a href="https://github.com/qgis/QGIS/blob/master/src/analysis/processing/qgsalgorithmbuffer.cpp#L122" target="_blank" rel="noopener noreferrer">https://github.com/qgis/QGIS/blob/master/src/analysis/processing/qgsalgorithmbuffer.cpp#L122</a>)<br /><br />So the time you'll have to wait to finish once you have clicked on the Cancel<br />button depends on the algorithm itself.<br /><br />Regarding the buffer algorithm, it could be that the processing is<br />taking a long time to make the final unaryUnion (in cas of dissolve) at<br />the end of the processing where isCanceled is not checked.<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><br />Note that I am using 3.10, not 3.14 or the latest master - maybe<br />something has improved in this respect in later versions?<br /><br />If nothing was improved in this respect - is there a chance to improve<br />the situation in the future?<br /><br /></blockquote>
<br />I don't think there's a magic solution, it depends on which algorithm<br />you estimate too slow to interrupt.</blockquote>
<br />Just to add to this comprehensive answer -- some providers don't have<br />any support for canceling algorithms mid-way. The GDAL algorithms<br />especially are a problem with this, because you can easily fire off a<br />process which will take hours to complete and have no way to cancel it<br />apart from killing the qgis session.<br /><br />(It's totally fixable, just a matter of finding time!)<br /><br />Nyall<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Thanks for the discussion,<br /><br />Andreas_______________________________________________<br />QGIS-Developer mailing list<br /><a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote>
<br />_______________________________________________<br />QGIS-Developer mailing list<br /><a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote>
_______________________________________________<br />QGIS-Developer mailing list<br /><a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br />List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br />Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank" rel="noopener noreferrer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p><br /></p>
</body></html>