Re: pre_init/post_init vs. performance

2012-07-27 Thread Jeremy Dunck
Can I get a review of the branch? 25% performance improvement of Model.__init__ in stock django seems worth landing. :) On Wed, Jul 18, 2012 at 3:48 AM, Jeremy Dunck wrote: > On Sun, Jul 15, 2012 at 11:07 AM, Jeremy Dunck wrote: >> >> That is indeed what I meant, but I think Anssi's probably r

Re: More efficient m2m assignment SQL

2012-07-27 Thread Jeremy Dunck
On Thu, Jul 26, 2012 at 11:26 PM, Anssi Kääriäinen wrote: > On 27 heinä, 08:15, Jeremy Dunck wrote: ... >> I would have expected something along the lines of : >> >> DELETE FROM `api_voter_districts` WHERE `voter_id` = 1 >> >> But instead it's 2 queries: >> >> SELECT `api_voter_districts`.`id`, `

Re: Django should load custom SQL when testing

2012-07-27 Thread Anssi Kääriäinen
On 27 heinä, 12:01, Andrew Godwin wrote: > Chiming in here on the migration front, my proposal for the next-gen > migration solution that'll potentially land in Django includes support > for just running chunks of raw SQL, so there's potential to auto-include > those in an initial migration. > > H

Re: Django should load custom SQL when testing

2012-07-27 Thread Andrew Godwin
On 26/07/12 19:33, Anssi Kääriäinen wrote: On 26 heinä, 19:35, Andrei Antoukh wrote: Having the hooks as a method or function, I find it much more interesting than having them in files. Above that allows logic in these methods, which with flat files is not possible. I also like raw SQL in Pyth