Optimizing SimpleJWT to imporove performance
I got a issue with SimpleJWT on my API built in Dajngo, it takes 2 secs to response. I know it doesn't seem like a long time but I really need to improve it. On the Profile table in MySQL database, username and password fields are indexed. I was reading the official documentation but I don't see any advice for improve performance.
Someone there with a better knowledge than me that who can help me?
settings.py
SIMPLE_JWT = {
'ACCESS_TOKEN_LIFETIME': timedelta(minutes=6000),
'ALGORITHM': 'HS256',
'SIGNING_KEY': SECRET_KEY,
}
urls.py (cutted)
from rest_framework_simplejwt.views import (TokenObtainPairView, TokenRefreshView)
urlpatterns = [
path('', include('api.urls')),
path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair')
]
I tried indexing the username and password fields on the Profile table.