Skip to content
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

Performance improvements #36

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

severinraez
Copy link

For our usecase (generating various QR codes with dimensions 65x65), RQRCode::QRCode.new runs in 1.8 seconds before and in 0.9 seconds after these changes.

This is a follow up to whomwah/rqrcode#145 , fixing the correct root cause - if you merge this, It'd be great if you could publish a new version :)

@swifthand
Copy link

Hi @severinraez,

I recently encountered issues related to these rules. Rules 1, 3 and 4 do not match the specification at all. I have opened an issue (#37) with an initial question about this, and I have working solution along with some tests. My question is "Is this a bug, or is there a reason for the incorrect behavior, such as reflecting an older version of the ISO Spec?" and if the answer is "This is a bug", I will be opening a Pull Request.

My changes would clash with this PR.

I am not the best at performance optimization. If my changes are deemed useful, I would welcome your input, as I only did the bare minimum to correct the penalty score behavior.

@severinraez
Copy link
Author

Hi @swifthand

Thanks for the ping. I'd be happy to help. I'll be on leave from next week to the end of August though.

Tangentially, if it's decided to move forward with both PRs, I might contribute a performance test that can help to measure performance impacts of code changes for larger QR codes. I think I could extract and anonymize some data from our usecase. Maybe we could build on top of https://github.com/whomwah/rqrcode_core/blob/master/test/benchmark.rb .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants