Hi,
Thank you both Julien and Nyall for your comprehensive replies.
Yes - I also have the impression that the buffer algorithm isn't
interruptible during dissolving.
My model contains a number of complex buffer, dissolve and difference
algorithms that take quite some time to execute.
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.
Thanks to both of you,
Andreas
On 2020-08-13 11:40, Nyall Dawson wrote:
On Thu, 13 Aug 2020 at 19:28, Julien Cabieces
<[email protected]> wrote:
Hi
Hi,
I am working with processing models these days - and depending on the
data amounts, the algorithms run quite long.
I noticed that although there is a "Cancel" button, this button has no
effect during the execution of one single algorithm that takes a long
time. Only after the execution of this single algorithm, then the
subsequent algorithms are cancelled. So if, e.g. a buffer algorithm
takes 5 minutes to execute and it is just one part of the whole model,
then if the user presses cancel during the execution of this buffer
algorithm, then he has to wait until the buffer algorithm finishes. Is
this observation correct?
No, you can interrupt an algorithm during its execution, but each algorithm
has to check if the user has canceled regularly during the
execution (here for the buffer algorithm for instance:
https://github.com/qgis/QGIS/blob/master/src/analysis/processing/qgsalgorithmbuffer.cpp#L122)
So the time you'll have to wait to finish once you have clicked on the Cancel
button depends on the algorithm itself.
Regarding the buffer algorithm, it could be that the processing is
taking a long time to make the final unaryUnion (in cas of dissolve) at
the end of the processing where isCanceled is not checked.
Note that I am using 3.10, not 3.14 or the latest master - maybe
something has improved in this respect in later versions?
If nothing was improved in this respect - is there a chance to improve
the situation in the future?
I don't think there's a magic solution, it depends on which algorithm
you estimate too slow to interrupt.
Just to add to this comprehensive answer -- some providers don't have
any support for canceling algorithms mid-way. The GDAL algorithms
especially are a problem with this, because you can easily fire off a
process which will take hours to complete and have no way to cancel it
apart from killing the qgis session.
(It's totally fixable, just a matter of finding time!)
Nyall
Thanks for the discussion,
Andreas_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer