-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
c apiThis has to do with the C API (_view)This has to do with the C API (_view)complexThis should only be looked at by someone who knows what they're doingThis should only be looked at by someone who knows what they're doinghotThis is high priorityThis is high priorityimprovementImprovement to an existing featureImprovement to an existing feature
Milestone
Description
Description:
view.py's route logging system through route_log
in the C API is extremely slow. Basically, with the new PyAwaitable vendor on the reactpy
branch, view.py is slower than pretty much all other web frameworks with route logging enabled.
With route logging disabled, it becomes several times faster, and outperforms every Python ASGI framework (that I've tried, at least). I tested FastAPI, BlackSheep, and Emmett, and view.py beat all of them with it's route logger disabled.
So, what's the fix? Well, we could just leave route logging out, but that's going to remove some debugging ability for the user, so there's three main options here:
- Only enable route logging during development mode.
- Optimize the route logging implementation (either write it in C, or compile it with Cython or something)
- Perform route logging in it's own thread, using only C file streams. This would remove interop with Python, so we'd have to add some settings.
Metadata
Metadata
Assignees
Labels
c apiThis has to do with the C API (_view)This has to do with the C API (_view)complexThis should only be looked at by someone who knows what they're doingThis should only be looked at by someone who knows what they're doinghotThis is high priorityThis is high priorityimprovementImprovement to an existing featureImprovement to an existing feature