Low performance.
See original GitHub issueWe render alot of invoices and we want to add a QRCode so that users can scan the invoice with their phone. Since we render several thousand invoices performance is important. I noticed it took 25ms to render the image when warm. I used the code from readme
QRCodeGenerator qrGenerator = new QRCodeGenerator();
QRCodeData qrCodeData = qrGenerator.CreateQrCode("The text which should be encoded.", QRCodeGenerator.ECCLevel.Q);
QRCode qrCode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrCode.GetGraphic(20);
Included in the 25 Ms is saving the bitmap to a memory stream and convert it to a byte array.
We are using full framework 4.7 and the computer i tested on is a AMD 5950x. Latest nuget version
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Dealing With Poor Performance - Lack of Ability, or Low ...
The two causes of poor performance – lack of ability and low motivation – are inextricably intertwined, and goal setting, feedback, and a...
Read more >The Real Reasons Behind Low Performance (And How To ...
Causes Of Low Performance. Very rarely is someone in the lowest rank because they are incompetent or lazy. If you are hiring qualified...
Read more >Managing Poor Performance: 5 Steps
By definition, poor work performance occurs when an employee fails to fulfill the expectations or responsibilities of their job. An employee may also...
Read more >What Is Poor Performance and How Can You Manage It?
Poor performance is the collection of performances, outputs, or attitudes that fall below a standard. This broad definition means poor ...
Read more >How to Address Poor Work Performance
Here are the most important steps and tips to handle poor work performance on your team, so they can get back on track...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @AndersMalmgren ,
If I read your comments correctly, you had the best performance when using the PngByteQRCode, but couldn’t use this renderer because you didn’t want the whitespace (=quiet zone). Correct?
In the latest CI build (and soon officially when I push version 1.4.2 to NuGet) there is now a new/additional parameter “drawQuietZones” available for the PngByteQRCode. If you set this to “false”, the codes will be rendered without quiet zones. With this you could take advantage of the performance benefits of the PngByteQR code.
It’s good to say that using the
PngByteQRCode
instead of theBitmapByteQRCode
reduced the amount of memory used - in that step - from 19mb to actually NOTHING which is WooW.I think the problem maybe with the
BitmapByteQRCode
itself.