-
Notifications
You must be signed in to change notification settings - Fork 38
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
Very long time to show #55
Comments
I have the same problem. Works fine on php 8.0 |
yeah, last time i use php7.4 it working fine, but when i switch to php8.1 the code show very long time |
Can confirm this, switched from working PHP7.4 to PHP8.1 (tried laravel8 and laravel9), same effect. as soon as I switch PHP to 8.1 the whole page speed is ruined. Not usable in production. |
@igoshev please make a fix for this |
i don't see any respond from @igoshev |
seems we must make our own fix for this package |
@tm1000 any idea maybe since you pushed the commit for laravel9? |
unusable for PHP8.1 |
@some0ne2 if you look at my commit you can see that I only bumped the composer file Regardless my company has five services that use this on php 8.1 for the last two-three months and we've experienced no issues |
@tm1000 Thanks for information, what laravel version and what PHP version exactly are you using? |
Laravel 9 and php 8.1.7 |
My coworker was confused on what I was asking. Yes we are experiencing the slowness too. The issue is all of the math in laravel-captcha/src/Captcha/Generator/GeneratorWaves.php Lines 68 to 136 in 6694a98
On individual runs it takes about 0.002 seconds. However once you multiply that by each of the foreachs such as the width (120) and height (80) you get 20 seconds. The smaller the image the less time it would take. Instead of looking into this further I just switched to: https://github.com/mewebstudio/captcha Not the ideal solution but it works for now. |
@tm1000 Thanks for update, any idea why this might occur only when we switch to PHP8.1? |
@some0ne2 it's a bug in php not anything with this library. The math functions are slightly slower in php 8.1 and thus causes slowdowns. |
The solution here is probably to replace WaveGenerator with code that uses https://github.com/Intervention/image to generate a similar image (this is what mewebstudio does) The math however is used to create the wavy text |
Did they replace the wave generator because of the bug in PHP8.1 too? |
@some0ne2 they dont use WaveGenerator. WaveGenerator is exclusive to this library |
Someone with free time available? Would provide some cups of coffee (tips) for fixing :). |
i think we should upgrade to PHP 8.2 |
@some0ne2 i have seen PHP 8.2 somewhere, but still in dev mode |
hi every body |
Any update onto this? |
I switched captcha providers |
@tm1000 any recommendation? |
Captcha show with very long time, i don't know why, but this is using localhost with xampp and php 8.1
The text was updated successfully, but these errors were encountered: