Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AndreasBackx
Copy link
Member

@AndreasBackx AndreasBackx commented Oct 6, 2023

I was working on the freezing functionality and along the way I'll use this PR to include some performance improvements.

1. Unneeded resized

image_util::rotate_image_buffer did 1-2 unneeded resizes. Remove the first one if the transform is a normal (or default) and remove the second if the requested size is the same as the original size.

Flamegraph before

image

Flamegraph after

image

I noticed a run in release mode going from ~0.24s to ~0.13s. I could use hyperfine for a better comparison, but I think the flamegraph speaks for itself.

@AndreasBackx AndreasBackx marked this pull request as ready for review October 6, 2023 00:51
@Shinyzenith Shinyzenith merged commit 8dbabab into waycrate:main Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants