I love Django, and the new `tasks` framework to replace `celery` (/whatever processor you prefer) looks great. I've only recently come back to it, and I do hope they continue to add more batteries to their "batteries included" framework over time. I was surprised just how much stuff I had to add to my little project that will require updating _outside_ the main framework, eg.: * django-components for little template…
In addition to the debug-toolbar, I'd really like people to know about https://github.com/jazzband/django-silk (no affiliation) I just recently found it and it has been amazing. It logs all your requests and responses by default (but is quite configurable) as well as your SQL queries (and how many/how long they take), in an easily searchable database. It can even profile functions for you. Makes it very to see at a g…
Django 6.0 beta 1 released
31–40 of 60 posts
Re: Django 6.0 beta 1 released
#32Incompatible with the default Ubuntu 22.04 LTS python version, just FYI (uses 3.10 whereas the minimum is now 3.12).
Re: Django 6.0 beta 1 released
#33Looks like Django 6 is getting an offical task system. There’s no real world brokers or workers supported (at least built in), but still centralising around a standard interface might make things nicer than the celery tentacle monsters Django apps eventually tend to mutate into.
Right, I'd never touch celery, but RQ is simple and has never let me down.
Celery is large and complex now and edge cases always show up at scale but that is usually not a reflection of the platform quality. The custom implementations I've seen are no where near what celery is capable of and can cater to so haven't seen the edge cases yet but that doesn't mean they implemented bug-free code and celery hasn't.
After asking about it, the issue always went towards a hand-wavey "performance". What is your experience on that front?
Re: Django 6.0 beta 1 released
#34Earlier quoted context omitted.
Right, I'd never touch celery, but RQ is simple and has never let me down.
I'm curious, why is that? I've heard that sentence before but usually from people who want to write their own task system and end up partially implementing what celery implements just worse. Celery is large and complex now and edge cases always show up at scale but that is usually not a reflection of the platform quality. The custom implementations I've seen are no where near what celery is capable of and can cater t…
Re: Django 6.0 beta 1 released
#35Earlier quoted context omitted.
Ops here, using System Python is always asking for trouble, just put Django into a container and call it a day.
What kind of trouble? That's all I've ever used for the last 15 years of my professional Django work and never had any issues...
Re: Django 6.0 beta 1 released
#36Earlier quoted context omitted.
What're some DB query performance issues you've run across in the past and how did you resolve them?
People generally don’t take the time to learn the framework and miss out on the tooling it provides. select_related for example. If I had a dollar for every project I’ve been hired to work on that didn’t use it, well, I actually do. Also, people in general don’t seem to be able to do more than very basic SQL, so creating views is seen as a little known performance “trick”. In general, people who don’t read the manual…
Re: Django 6.0 beta 1 released
#37Earlier quoted context omitted.
Right, I'd never touch celery, but RQ is simple and has never let me down.
I'm curious, why is that? I've heard that sentence before but usually from people who want to write their own task system and end up partially implementing what celery implements just worse. Celery is large and complex now and edge cases always show up at scale but that is usually not a reflection of the platform quality. The custom implementations I've seen are no where near what celery is capable of and can cater t…
I never considered writing my own, I just want a tool to plug in and work so I can focus on the application. I also never thought performance of this part of the stack would be a bottleneck for my use cases.
In contrast, I am happy to use Django over Flask because you can't get away from needing lots of web framework features for a nontrivial web app. The bigger framework is usually justified, especially if it's high quality like Django. But spawning tasks (for my use cases) is just an aspect of the project that can have a simple interface and it doesn't justify adopting a big framework. Time I've invested in Django (going back to 2009) is still paying off for me today, but there'd be much lower ROI on the time I'd have to put into Celery. Unless my projects really needed its complexity, but I think far fewer projects actually require that in practice than their architects tend to think.
Re: Django 6.0 beta 1 released
#38I love Django, and the new `tasks` framework to replace `celery` (/whatever processor you prefer) looks great. I've only recently come back to it, and I do hope they continue to add more batteries to their "batteries included" framework over time. I was surprised just how much stuff I had to add to my little project that will require updating _outside_ the main framework, eg.: * django-components for little template…
In addition to the debug-toolbar, I'd really like people to know about https://github.com/jazzband/django-silk (no affiliation) I just recently found it and it has been amazing. It logs all your requests and responses by default (but is quite configurable) as well as your SQL queries (and how many/how long they take), in an easily searchable database. It can even profile functions for you. Makes it very to see at a g…
Re: Django 6.0 beta 1 released
#39Earlier quoted context omitted.
In addition to the debug-toolbar, I'd really like people to know about https://github.com/jazzband/django-silk (no affiliation) I just recently found it and it has been amazing. It logs all your requests and responses by default (but is quite configurable) as well as your SQL queries (and how many/how long they take), in an easily searchable database. It can even profile functions for you. Makes it very to see at a g…
Silk is so dang amazing I deploy it to devel and staging at work. It helps me so quickly drill down at bad ORM or SQL performance issues.
Re: Django 6.0 beta 1 released
#40Earlier quoted context omitted.
People generally don’t take the time to learn the framework and miss out on the tooling it provides. select_related for example. If I had a dollar for every project I’ve been hired to work on that didn’t use it, well, I actually do. Also, people in general don’t seem to be able to do more than very basic SQL, so creating views is seen as a little known performance “trick”. In general, people who don’t read the manual…
FYI you can avoid the manual sprinkling of select_related somewhat with https://pypi.org/project/django-auto-prefetch/ , which avoids the lowest hanging N+1 loops automatically. Definitely not a cure all but it helps.