On 12/12/2014 10:42 AM, Collin Anderson wrote:
> Re: the hacker news thread, (sorry for getting a little off topic,) I just 
> wanted to mention a few places where we've tried to improve some of those 
> things recently:
> - The ORM is still slow, but we've added prefetch_related() and improved 
> select_related() which allows you do use fewer queries.

I'm not sure I'd make a general statement that "the ORM is slow" without
seeing further evidence. It'd be interesting to see benchmarks against
something like SQLAlchemy, but I haven't seen that (and a Google search
didn't turn anything up).

As is often the case, how fast the Django ORM is in practice has a lot
more to do with the skill and experience of the person using it than
anything else. You can make any ORM plenty slow if you carelessly code a
bunch of N+1 query situations.

> - We've pulled out some of components into separate projects: 
> django-localflavor, django-contrib-comments, django-formtools, and I 
> imagine more in the future.
> - You can now use custom user models.
> - We're working on an official public API for the model._meta internals and 
> working towards components only using that. It also means it will be easier 
> to use non-django models in the admin.
> - We're working on de-coupling django templates, allowing them to be used 
> on their own, and making it much easier to use other template engines like 
> Jinja2.
> - There's are also quite a lot of people using django-rest-framework for 
> creating REST apis, which was one thing the thread said django was not good 
> at.

Good list. I think Josh Smeaton's recent expressions refactor in master
should definitely make that list too; it goes a long way towards
addressing Alex's complaints in this talk (linked from the HN thread):
https://speakerdeck.com/alex/why-i-hate-the-django-orm

Also Aymeric's work in 1.6 rebuilding the transaction system from
scratch: Personally, I think Django 1.6+ has a better and clearer
transaction model than SQLAlchemy.

A few years back, I'd have said SQLAlchemy was clearly superior to the
Django ORM. Today, I would not make that claim; having used both a fair
bit, I think they have different strengths.

Carl

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/548B2B9C.1080904%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to