These are chat archives for django/django

Aug 2016
Tai Lee
Aug 22 2016 06:57
why does django take a long time to save an uploaded 1GB file? testing locally it takes a few seconds (~15) to upload the file but then django times out after a minute (gunicorn timeout set to 60s)... django just has to save the file, not do anything to it...
Dmitry Fedotkin
Aug 22 2016 15:20
Hi everyone!
Can anyone help me with a code optimization? I am profiling my script and stucked with a three lines
1) If the list was created befory, why does iteration through that list take so much time?
2) records is OneToOneField; According to Django documentation select_related can help there, but it makes the execution time even longer! Why?
3) all the code wrapped in 'with transaction.atomic():' takes same time as the code without that statement, why?
Ramon Moraes
Aug 22 2016 18:56
Why do you need enumerate?
Dmitry Fedotkin
Aug 22 2016 20:12
Just for progress output. I profiled the code without that and it turned out that it doesnt affect significantly