Implement a number of performance optimizations that altogether cut down the running time to about half, as tested with a 2905 * 4029 raster with 1 start point and 1 end point.
Don't use queue.PriorityQueue, as it is a threadsafe queue with unnecessary locking - use heapq.heappush() and heappop() instead.
Don't use function calls - instead, inline all functions. Almost all the functions in the old code were only used in one place.
Instead of dicts and sets, use lists of lists, which have faster lookup.
Reduce the number of calls to feedback.setProgress().
Implement a number of performance optimizations that altogether cut down the running time to about half, as tested with a 2905 * 4029 raster with 1 start point and 1 end point.
Don't use queue.PriorityQueue, as it is a threadsafe queue with unnecessary locking - use heapq.heappush() and heappop() instead.
Don't use function calls - instead, inline all functions. Almost all the functions in the old code were only used in one place.
Instead of dicts and sets, use lists of lists, which have faster lookup.
Reduce the number of calls to feedback.setProgress().