Re: Improve queries on django admin

2016-07-22 Thread Tobias McNulty
I think the question was more about memory usage than speed, but the answer is the same, in my opinion. The only thing I'll add is that -- if returning a mere 100 rows of a table is really causing memory issues -- there are alternatives to storing large blobs of data directly in the DB (e.g.,

Re: GitHub PR status within Trac

2016-07-22 Thread Carl Meyer
Hi Tobias, On 07/22/2016 04:53 PM, Tobias McNulty wrote: > I spent some time during the DjangoCon sprint today looking into > dashboard.djangoproject.com and how > it calculates metrics. I was hoping to add some new metrics that mash up > data from GitHub and

GitHub PR status within Trac

2016-07-22 Thread Tobias McNulty
I spent some time during the DjangoCon sprint today looking into dashboard.djangoproject.com and how it calculates metrics. I was hoping to add some new metrics that mash up data from GitHub and Trac together. While technically possible, this breaks down when you want to link out to a list of the

Re: Improve queries on django admin

2016-07-22 Thread Shai Berger
I tend to agree with Tim -- in particular, a query on the admin should only return a small (<100) number of records, due to paging; if, for that size of query, you see a significant difference between returning all the columns and returning just the ones you need, it is suspicious: Either you

Proposal: Use HTML5 boolean attribute for checked on checkbox/radio inputs

2016-07-22 Thread Jon Dufresne
Hi, I would like to propose that Django renders the "checked" attribute of checkbox and radio inputs using the HTML5 boolean style attributes. Django has supported HTML5 boolean attributes since 1.8 [0]. It has used them internally for the "disabled" attribute since 1.9 [1] and the "required"

Re: Improve queries on django admin

2016-07-22 Thread Tim Graham
I'm a bit wary of the complexity this would add, especially given this warning in the documentation: The defer() method (and its cousin, only() , below) are only for advanced use-cases. They

Re: Middleware error framework, high level logging for database queries

2016-07-22 Thread Curtis Maloney
On 19/07/16 05:16, Rishi Gupta wrote: Hi django-developers, (1) Middleware error framework. Zulip has some exception middleware to allow 40x errors to be returned to the user from anywhere within the view code via raising a special exception, which we’ve found to be a really nice, convenient

Re: Improve queries on django admin

2016-07-22 Thread Rael Max
Hi Lucas, thanks for reply I think that select_related gives a great improve on performance but we can improve his usage passing the columns that we want retrieve, avoiding getting most columns/data and allocate more memory than necessary. Em quinta-feira, 21 de julho de 2016 17:01:00 UTC-3,