-
-
Notifications
You must be signed in to change notification settings - Fork 318
Performance not ideal during short URL creation #2428
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
Comments
I'm happy to merge #2429, but just have in mind that RoadRunner bootstraps the app only once and the code is in memory in any subsequent requests anyway, so I wouldn't expect a big performance impact (if at all). Opcache makes more sense when serving Shlink using a traditional web server, where the code is bootstrapped and loaded from the filesystem to memory on every request. Perhaps if you can elaborate what you mean by "slow response times", we can expand on #2293 and find a different potential bottleneck. |
I tested #2429, and I can confirm there doesn't seem to be a big difference in execution time, probably because of what I explained above. I wonder why RoadRunner mentions opcache in a few places (the fact that is referenced in |
Damn. I have about 200 ms when creating a short link. In this case I could imagine my database becoming a bottleneck. |
Creating a short URL requires a bunch of checks, especially depending on the options you send, so it's one of the heaviest actions you can make. I don't think 200ms is terrible, but there's definitely room for improvement. If you can share more details on your setup, I could try to see where the bottleneck is when creating a short URL. There might be some missing index or some operation that can be skipped in certain scenarios. |
Closing this for now. I'm happy to continue investigating possible performance issues if more details to reproduce are provided |
Shlink version
stable
PHP version
8.4.5
How do you serve Shlink
Docker image
Database engine
MySQL
Database version
n/a
Current behavior
I was wondering about slow response times of my Shlink instance on a Kubernetes stack, so I checked the PHP configuration of the Shlink image.
I discovered that the OPCache extension is not installed, although it is explicitly activated in https://github.com/shlinkio/shlink/blob/develop/config/roadrunner/.rr.yml.
Expected behavior
OPCache should be installed.
Minimum steps to reproduce
The text was updated successfully, but these errors were encountered: