-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
BitmapByteQRCode performance optimization #566
BitmapByteQRCode performance optimization #566
Conversation
Removed loops where possible and set fixed size objects
@Shane32 May I ask you for a review? (Please be critical with the benchmark project. I tried to exclude the QRCode data generation, as it is ramp-up stuff, from the benchmarks, but I'm not sure, if I did it right.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Benchmarks look great! I've just jotted down some notes for additional improvements that could be made, whether that be within this PR or another one.
Hi Shane, thanks for your review. I implemented and tested all of your suggestions. Thanks for the great input! :-) |
Summary
I tried to optimize the performance of BitmapByteQRCode by removing loops and pre-calculating data where possible. Also fixed object size/capacity to keep memory footprint low.
Performance details
Before this PR
After/with changes from this PR
After implementing changes suggested by @Shane32 via PR review
Test plan
To ensure that the optimizations work out and break anything I added test cases and benchmarks to the project.