wps_forward_bot
🚀 New issue to wemake-services/django-modern-rest by @sobolevn
📝 Provide faster JWT decode and encode options with `msgspec` (#1390)
When msgspec is installed, we can speed up the pyjwt encode and decode.
By default it uses the default json module for both convertions:
1. https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/api_jwt.py#L156-L172
2. https://github.com/jpadilla/pyjwt/blob/7144e4534c34810f4525dc4578a32addd8212cff/jwt/api_jwt.py#L287-L301
We can provide our own PyJWT subclass and make the process faster. Since JWT is a hot path, even a smaller boost will be a massive win overall.
This will require a benchmark test :)
#feature #good_first_issue #help_wanted #security #opensource_september #django_modern_rest
sent via relator
1 · 429 ·