Mystery lag in completing Django POST request after form.save() completes
One of the forms in my Django application takes a long time to submit, save, and redirect. I'm using a variant of cProfile
to measure the time spent on form.clean()
and form.save()
. It takes <0.1 seconds to run form.clean()
, then ~10 seconds to run form.save()
, then calls get_success_url()
, and then hangs for another ~30 seconds before loading the success_url page. The success_url page should take negligible time to render.
What's eating up the mystery 25 seconds?