Again, it's hard to tell what the slowdown might be caused by without a more detailed
investigation. I suggest you use cProfile[0] for that.
Given your tests are only running for a small amount of time relative to Django's setup
time I assume two things are causing the apparent slowdown:
1. A slower Django setup(), I think some changes were part of 1.8 -> 1.11
2. Reliance on now lazily loaded part of Django.
Cheers,
Simon
[0] https://docs.python.org/3/library/profile.html
Le samedi 15 juin 2019 11:25:10 UTC-4, Mark Jones a écrit :
Ah, but the slowdown is happening from 1.8 forward, each version of Django make things just a bit slower. It's a gradual slowdown.I do think I've got 3.2x libsqlite though. So we can account for the slowdown on 2.1 -> 2.2/usr/lib/libsqlite3.0.dylib
/usr/lib/libsqlite3.dylib
/usr/local/Cellar/sqlite/3.27.1/lib/libsqlite3.0.dylib
/usr/local/Cellar/sqlite/3.27.1/lib/libsqlite3.a
/usr/local/Cellar/sqlite/3.27.1/lib/libsqlite3.dylib
/usr/local/Cellar/sqlite/3.28.0/lib/libsqlite3.0.dylib
/usr/local/Cellar/sqlite/3.28.0/lib/libsqlite3.a
/usr/local/Cellar/sqlite/3.28.0/lib/libsqlite3.dylib On Sat, Jun 15, 2019 at 8:16 AM Simon Charette <char...@gmail.com> wrote:--I meant Django 2.0 -> 2.1. As long as you are using Django 2.2 with SQLite 3.20+the slowdown I mentioned should be effective.Simon
Le samedi 15 juin 2019 08:32:56 UTC-4, Mark Jones a écrit :Maybe that's the case, I didn't build the python2.7 or 3.7, but I used pyenv to install 3.4, 3.5, and 3.6 and they are all using the same version of SQLite. And with each version of python, the tests slow down as the version of django increases. Could this still be the SQLite v2.1->v2.2?Django isn't getting slower as the version of python increases, it's getting slower as the version of Django increases.On Sat, Jun 15, 2019 at 7:20 AM Simon Charette <char...@gmail.com> wrote:--Hi Mark,It's hard to tell exactly what's going on without more details but assuming you are running testsagainst SQLite the 2.1 to 2.2 slowdown is likely caused by the fact database constraints arenow checked of each TestCase[0].Cheers,SimonLe samedi 15 juin 2019 07:26:35 UTC-4, Mark Jones a écrit :I was fixing up a Django app https://github.com/mark0978/django-softdelete and setting up tox to make sure it worked with all the listed versions because of issues opened on the original repo. While I was running tox locally I noticed that with every version of Django, the tests ran slower, and from 1.8 -> 2.2 the test time was nearly doubled. This was true for every version of python tested from 2.7 - 3.7.If you want to check this on your machine, just grab the repo and run tox. I'm including the minimal tox output to show this phenomenon.py27-A installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.,Django==1.8.19,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 2.821spy27-B installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.,Django==1.9.13,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 3.036spy27-C installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.,Django==1.10.8,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 3.198spy27-D installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.,Django==1.11.21,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 3.609spy34-A installed: DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).,Django==1.8.19,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 2.733spy34-B installed: DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).,Django==1.9.13,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 3.066spy34-C installed: DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).,Django==1.10.8,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 3.232spy34-D installed: DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).,Django==1.11.21,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 3.564spy34-E installed: DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).,Django==2.0.13,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 5.515spy35-A installed: Django==1.8.19,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 2.603spy35-B installed: Django==1.9.13,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 2.923spy35-C installed: Django==1.10.8,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 3.099spy35-D installed: Django==1.11.21,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 3.252spy35-E installed: Django==2.0.13,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 5.163spy35-F installed: Django==2.1.9,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 5.784spy35-G installed: Django==2.2.2,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1, sqlparse==0.3.0 ------------------------------------------------------------ ---------- Ran 14 tests in 6.744spy36-A installed: Django==1.8.19,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 2.619spy36-B installed: Django==1.9.13,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 2.835spy36-C installed: Django==1.10.8,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 3.025spy36-D installed: Django==1.11.21,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 3.147spy36-E installed: Django==2.0.13,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 5.058spy36-F installed: Django==2.1.9,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 5.722spy36-G installed: Django==2.2.2,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1, sqlparse==0.3.0 ------------------------------------------------------------ ---------- Ran 14 tests in 6.524spy37-A installed: Django==1.8.19,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 2.584spy37-B installed: Django==1.9.13,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 2.730spy37-C installed: Django==1.10.8,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 2.892spy37-D installed: Django==1.11.21,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 3.050spy37-E installed: Django==2.0.13,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 5.117spy37-F installed: Django==2.1.9,-e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete,pytz==2019.1 ------------------------------------------------------------ ---------- Ran 14 tests in 5.778spy37-G installed: -e git+git@github.com:mark0978/django-softdelete.git@ 72b46b0a7823a4fdcb43489663e907 13ca7d698d#egg=django_ softdelete ------------------------------------------------------------ ---------- Ran 14 tests in 6.647s
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/ .XQit6Kf4ZRA/unsubscribe
To unsubscribe from this group and all its topics, send an email to django...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/84e45bad- .87d0-4da0-acd9-26e00140b05a% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/ .XQit6Kf4ZRA/unsubscribe
To unsubscribe from this group and all its topics, send an email to django...@googlegroups.com .
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users .
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/28f5c20a- .334d-4c81-a270-e4d5019033c5% 40googlegroups.com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0dddb785-9b67-49a2-897c-5f0b3cd59073%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment