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

Slow $writer->writeFile locally, didn't test on the server #136

Open
elnath78 opened this issue Jun 26, 2023 · 3 comments
Open

Slow $writer->writeFile locally, didn't test on the server #136

elnath78 opened this issue Jun 26, 2023 · 3 comments
Labels

Comments

@elnath78
Copy link

I'm writing a simple 2FA and when I pass the Uri to be printed as .svg file I averaged 1.76 seconds to save it to disk. I'm wondering if this is normal or if there is something I could do, this is how I timed it:

$renderer = new ImageRenderer(
    new RendererStyle(300),
    new SvgImageBackEnd()
);

$writer = new Writer($renderer);

$start_time = microtime(TRUE);

$writer->writeFile($uri, 'qrcode.svg');

$end_time = microtime(TRUE);

echo $end_time - $start_time;
@DASPRiD
Copy link
Member

DASPRiD commented Mar 19, 2024

That sounds awfully slow, but I cannot reproduce that. This should be rather in the 1.76 millisecond area, not seconds.

@elnath78
Copy link
Author

That sounds awfully slow, but I cannot reproduce that. This should be rather in the 1.76 millisecond area, not seconds.

I was on Windows 10 running XAMPP if this can help you, what test did you do?

@DASPRiD
Copy link
Member

DASPRiD commented Mar 19, 2024

I ran your code on my local Linux machine. If the issue is Windows specific, I won't be able to assist there.

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

No branches or pull requests

2 participants