#32312: Performance decrease following implementation of ASGI handler and coroutine-safety. -------------------------------+-------------------------------------- Reporter: David Smith | Owner: nobody Type: Uncategorized | Status: new Component: Uncategorized | Version: 3.0 Severity: Normal | Resolution: Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+--------------------------------------
Comment (by David Smith): The benchmark for `url_reverse` is the outlier here and with it being one of the more simple functions it is easier to see what is going on here. I've attached a couple of images generated by profiling this benchmark. It shows, an increase due to the replacement of `threading.local` with `asgiref.local.Local`. In the "old" image the `get_urlconf` and `get_script_prefix` are the first two unnamed bars on the 2nd row, the time to execute these two grow significantly in the "new" version. It's a similar story with `form_create` but it only has one element impacted and so is less impacted overall by this change. I started to look at `save()` but this function is more complex, although initial viewing suggests some elements are being impacted by this change. I think this starts to help indicate what the issue could be. Your note about what a significant slow down means is important, what ''does'' significant mean? I think it's much more than a particular function being slower on a single benchmark, for example, I wouldn't suggest that `url_reverse` is a particularly good indicator of the overall performance of Django in general. -- Ticket URL: <https://code.djangoproject.com/ticket/32312#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.4480a43bdd30b026eb818229cb6ca8e9%40djangoproject.com.