Re: Model Creation Optimization

2007-12-24 Thread ivan.illarionov
to these latest changes you've made to ModelBase? And you may want to > run benchmarks and ensure its not effecting speeds adversely > elsewhere. > > On Dec 24, 1:08 pm, "ivan.illarionov" <[EMAIL PROTECTED]> > wrote: > > > I was able to optimize it even mor

Re: Model Creation Optimization

2007-12-24 Thread ivan.illarionov
I was able to optimize it even more by moving classmethods of Model to ModelBase as normal methods. It's really faster and clearer because separates initialization of Model classes and Model instances On 24 дек, 23:41, "ivan.illarionov" <[EMAIL PROTECTED]> wrote: > M

Re: Model Creation Optimization

2007-12-24 Thread ivan.illarionov
My patch is little faster against hasattr() 2.54 vs 2.56 and 2.56 vs 2.59 On 24 дек, 22:04, "ivan.illarionov" <[EMAIL PROTECTED]> wrote: > Just benchmarked my patch. Class creation runs faster. 1000 simple > classes was created in 2.5 seconds vs. 2.7 seconds and 1000 subcl

Re: Model Creation Optimization

2007-12-24 Thread ivan.illarionov
Just benchmarked my patch. Class creation runs faster. 1000 simple classes was created in 2.5 seconds vs. 2.7 seconds and 1000 subclasses in 2.6 vs. 2.8 On 24 дек, 20:59, "ivan.illarionov" <[EMAIL PROTECTED]> wrote: > Please take a look at my patch athttp://code.djangoproj

Re: Model Creation Optimization

2007-12-24 Thread ivan.illarionov
Please take a look at my patch at http://code.djangoproject.com/ticket/6214 There's no need to check for _meta if base is not Model and issubclass(base, Model) All Model subclasses except Model class itself have _meta attribute. It can be optimized further if we build the list of parents in the

Re: signals

2007-12-23 Thread ivan.illarionov
Just did a simple benchmark and found that Louie is about 150% slower than current dispatcher in Django. It looks like Louie developers doesn't care about performance at all... On 23 дек, 16:49, Simon Willison <[EMAIL PROTECTED]> wrote: > On 23 Dec 2007, at 12:39, ivan.illarionov w

Re: signals

2007-12-23 Thread ivan.illarionov
As I know PyDispatcher project has evolved into Louie project and is actively maintained by the same author. The code is *not* ugly, is closer to Django coding style and has a lot of improvements. http://louie.berlios.de/ Even more, I replaced content of django.dispatch with louie code, renamed a

Re: Django Model Inheritance

2007-12-19 Thread ivan.illarionov
1. You still can use super in NonDeleted.get_query_set by using self.__class__ instead of NonDeleted 2. It could be better to use issubclass(key, models.Manager) instead of key == 'objects' On 19 дек, 11:53, Sridhar Ratnakumar <[EMAIL PROTECTED]> wrote: > I wanted to share this little hack of min