The flood fill algorithm introduced in https://github.com/cloudhead/rx/pull/100 was simple, but not very fast. I don't know how common it is for people to use rx to edit large-ish images, but I figured it'd be worth taking a little extra time to optimize.
In release mode, this algorithm fills a 1024x1024 canvas in ~12ms, vs ~210ms for old algorithm
The flood fill algorithm introduced in https://github.com/cloudhead/rx/pull/100 was simple, but not very fast. I don't know how common it is for people to use
rx
to edit large-ish images, but I figured it'd be worth taking a little extra time to optimize. In release mode, this algorithm fills a 1024x1024 canvas in ~12ms, vs ~210ms for old algorithm