Django 1.6 alpha 1 released
djangoproject.com
djangoproject.com
Persistent database connections
Django now supports reusing the same database connection for several requests. This avoids the overhead of re-establishing a connection at the beginning of each request. For backwards compatibility, this feature is disabled by default. See Persistent connections for details.
Absolutely. My expectation is that this alone should dramatically increase app response times for any reasonably DB-dependant application.
I also can't wait to have such mode fully supported by the core product.
That this fact is not the headline, and apparently not even considered worthy of mention in a long list of "miscellaneous" items, suggests that those of us who aren't legacy Python 2 users (and don't ever intend to be) just aren't Django's target market. Django has been around for a relatively long time accumulating so many long-time users that I understand the desire to make supporting those who long ago entrusted their businesses to Django the #1 priority. The flip side of that, though, is that those of us without such a legacy would seem destined to be lower priority, maybe significantly lower, for at least a few more years.
If there is no Flask in the next year or so that is redesigned to focus primarily on Python 3 web dev, we'll still use Python 3 for various tasks, but for web dev it might make more sense for us to just move on to another language with a more-recently-designed framework.
Python 3 support in 1.5 was marked as "experimental"[1], with 1.6 being the release that was supposed to be marked as suitable for general use. I believe that's what GP is referring to.
[1]: https://docs.djangoproject.com/en/dev/faq/install/#can-i-use...
>Fact is, we just forgot to mention it. Django's working so well on Py3 that it kinda seems like no big deal any more, so we forgot to mention it in the release notes. I'll fix that once I get a chance.
Your choice.
If you are very concerned about this, you should bring it up on the django-dev list:
https://groups.google.com/forum/?fromgroups#!forum/django-de...
http://www.aeracode.org/2013/5/22/south-08-migrations-and-dj...
Fact is, we just forgot to mention it. Django's working so well on Py3 that it kinda seems like no big deal any more, so we forgot to mention it in the release notes. I'll fix that once I get a chance.
It is clearly not a full-featured connection pool. Sure, it gives some quick performance wins within each thread, but this is no proper cross-process connection pool.
[1] - https://github.com/django/django/commit/2ee21d9f0d9eaed0494f...
For this release specifically we wanted to have it out before the end of summer so that we can be ready to merge Andrew's migration work and any GSoC code and turn around another release quickly.
Is this the same as pgBouncer connection pooling? It does sound like the same - but unsure. I just spent a week learning and configuring pgBouncer! :(
Now, I've not benchmarked this, so it's just a guess. Further, the specific performance characteristics will depend on your specific setup -- particularly upon where you have pgbouncer running -- so the only real answer is to benchmark and see.
New Relic does a good job showing time spent connecting to the db, fwiw, so you may want to give that a try.
* Fallout from transaction changes. Whether this affects your code will vary, and when and how it can affect your code is documented, or
* Bugfixes: lots of the stuff in there consists of "we had a bug, we fixed the bug, but you should know this in case you relied on the buggy behavior".
Split those out and it's actually quite a bit shorter.