I'm relatively new to Symfony. I am currently working on a prototype with Symfony & Docker.
Today I implemented an AuthenticationService via Login (like this: https://symfony.com/doc/current/security.html). When I now load my application, the server- response time is around 1500 ms. Without this authentication, the response time is around 70 ms.
I turned on the profiler, and it seems that the "TraceableFirewallListener" takes a lot of time. Symfony Profiler Result I already tried the comman tipps (changing to prod env, disabeling debug).
I don't really have a clue why it is taking that long, but I'm pretty sure that this can't be normal. I also do not want to implement the "solution" from here (TraceableFirewallListener extremely long loading time), since this seems a very bad practice for me.
My security.yaml is below. If you need anything else, please ask me and I will attatch it.
Thanks for the help in advance
UPDATE
Installed blackfire and found some interesting graphs, maybe this will help: https://blackfire.io/profiles/197c3e1c-c53b-4c28-b793-a384fdb90755/graph
security:
encoders:
App\Entity\User:
algorithm: auto
providers:
app_user_provider:
entity:
class: App\Entity\User
property: email
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: lazy
provider: app_user_provider
guard:
authenticators:
- App\Security\LoginFormAuthenticator
logout:
path: app_logout
access_control:
- { path: ^/login$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
Why is my response time so long? And how do I make it shorter?