New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize bucket fill with cache #979

merged 1 commit into from May 30, 2018


None yet
2 participants

scribblemaniac commented May 24, 2018

This is all from #837. The relevant section from there:

Inspired by how Krita does flood filling, I have added a hash map to remember if colors are within the threshold for the duration of the operation (threshold and oldColor will remain constant, so only newColor is needed for lookup). Since the vast majority of the pixels that will be encountered are usually from a small subset of colors, this should have significant speed benefits. The Euclidean difference operation is probably a bit slower than the old difference operation, so this is even more important.

Hmm, I wonder if this will work: Closes #837.


This comment has been minimized.


chchwy commented May 30, 2018

Cool. Thanks @scribblemaniac .

@chchwy chchwy merged commit ee8fb36 into pencil2d:master May 30, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@scribblemaniac scribblemaniac deleted the scribblemaniac:bucket-optim branch Aug 21, 2018

@chchwy chchwy added this to the 0.6.2 milestone Sep 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment