Skip to content

Low performance. #319

Closed
Closed
@AndersMalmgren

Description

@AndersMalmgren

We 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions