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

[WIP/QRCoder2] Consider Removing QRCodeGenerator Instance Methods #552

Open
Tracked by #512
csturm83 opened this issue May 27, 2024 · 0 comments
Open
Tracked by #512

[WIP/QRCoder2] Consider Removing QRCodeGenerator Instance Methods #552

csturm83 opened this issue May 27, 2024 · 0 comments
Labels
qrcoder2 Everything related to QRCoder v2

Comments

@csturm83
Copy link
Contributor

csturm83 commented May 27, 2024

Note: This issue is part of the planning of version 2 of the QRCoder. The meta-issue can be found here. These comments have been copied into this issue here, with the comments marked as such. If comments on the topic of this issue already exist in the meta thread, they have been copied here, naming the authors.

Topic

The instance methods do nothing but delegate to static methods (CreateQrCode) or nop (Dispose).

Taking it a step further, you could then also remove the constructor and potentially make the class static.

Rationale
Even empty objects can cause unnecessary perf hits when in a hot loop. See this previously reported issue.

I understand this fundamentally changes common usage patterns. I believe it would be for the better (less of a potential perf trap).

@codebude codebude added the qrcoder2 Everything related to QRCoder v2 label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qrcoder2 Everything related to QRCoder v2
Projects
None yet
Development

No branches or pull requests

2 participants