Re: Django 1.5: AUTH_USER_MODEL and GeoManager

2012-10-11 Thread ptone
On Thursday, October 11, 2012 12:51:07 AM UTC-7, Max wrote: > > Hi there, > this is my first post here; hope I'm posting to the right group. > I'm currently working on getting to run an 1.4-application (using a > profile model) on 1.5dev, using the the new (eagerly awaited by me) > custom user

Re: URL dispatcher slow?

2012-10-11 Thread Ɓukasz Rekucki
On 11 October 2012 10:20, Russell Keith-Magee wrote: > > And don't just say "Why are Django's URL resolvers slow?". Do some > profiling, and come back with an analysis of where the time is being > spent and/or wasted. FWIW, here's a link to a cProfile result for the mentioned benchmark[1] on Djan

Re: A.objects.getdefault

2012-10-11 Thread Daniel Moisset
On Thu, Oct 11, 2012 at 2:00 PM, Marijonas Petrauskas wrote: > You can use: > > obj = next(iter(SomeModel.objects.filter(foo='bar')), None) > > The 'iter' part is not particularly elegant, but it's the only one-liner > known to me. > obj, = SomeModel.objects.filter(foo='bar') or [None] but we're

Re: URL dispatcher slow?

2012-10-11 Thread Sean Bleier
JKM, I'm wondering if it would benefit the community to house djangobench under https://github.com/django to give it more visibility. Just a thought. On Thu, Oct 11, 2012 at 9:45 AM, ptone wrote: > > > On Thursday, October 11, 2012 1:21:09 AM UTC-7, Russell Keith-Magee wrote: >> >> >> That said

Re: A.objects.getdefault

2012-10-11 Thread Marijonas Petrauskas
You can use: obj = next(iter(SomeModel.objects.filter(foo='bar')), None) The 'iter' part is not particularly elegant, but it's the only one-liner known to me. -- Marijonas On Thu, Oct 11, 2012 at 3:45 PM, Ole Laursen wrote: > On Tuesday, October 9, 2012 7:15:55 PM UTC+2, ptone wrote: >> >> E

Re: URL dispatcher slow?

2012-10-11 Thread ptone
On Thursday, October 11, 2012 1:21:09 AM UTC-7, Russell Keith-Magee wrote: > > > That said - could Django be faster? Sure. *Anything* can be improved. > > So, if you've got a suggestion, make it. If you think URL resolving is > the source of the problem, propose a way to improve the speed of UR

Re: URL dispatcher slow?

2012-10-11 Thread Marco Paolini
On 11/10/2012 15:53, Tom Evans wrote: On Wed, Oct 10, 2012 at 7:52 AM, Moonlight wrote: Here is an article comparing various URL dispatchers: http://mindref.blogspot.com/2012/10/python-web-routing-benchmark.html What cause django URL dispatcher that much... slow? Now that I've looked in de

Re: Django 1.5: AUTH_USER_MODEL and GeoManager

2012-10-11 Thread Luke Plant
On 11/10/12 08:51, Max wrote: > Hi there, > this is my first post here; hope I'm posting to the right group. > I'm currently working on getting to run an 1.4-application (using a > profile model) on 1.5dev, using the the new (eagerly awaited by me) > custom user model. > I used django.contrib.gis.

Re: URL dispatcher slow?

2012-10-11 Thread Aymeric Augustin
2012/10/11 Tom Evans > Now that I've looked in detail at the test, it is because the test is > nonsensical. Each time it tests the URLs, it constructs a fresh WSGI > application. Each fresh application has to compile each URL in the > urlconf before using it. It then destroys the application, and

Re: A.objects.getdefault

2012-10-11 Thread Ole Laursen
On Tuesday, October 9, 2012 7:15:55 PM UTC+2, ptone wrote: > > Earlier discussion > > https://groups.google.com/forum/?fromgroups=#!topic/django-developers/Saa5nbzqQ2Q > This was the thread I referred to. If was from 2006 and ended up being about something else. > tickets: > https://code.djang

Re: URL dispatcher slow?

2012-10-11 Thread Michael
This conversation is getting nasty. Django's URL dispatcher is what it is. If you can get the flexibility that the current URL dispatcher provides while making it faster, I imagine everyone on this thread would be impressed. There is no reason to use Django's URL dispatcher. It is quite easy to ma

Re: URL dispatcher slow?

2012-10-11 Thread Daniel Sokolowski
Was that necessary? I am tuning out of this conversion, it is becoming hostile. From: Alex Gaynor Sent: Thursday, October 11, 2012 10:01 AM To: django-developers@googlegroups.com Subject: Re: URL dispatcher slow? On Thu, Oct 11, 2012 at 6:52 AM, Daniel Sokolowski wrote: I absolutely a

Re: URL dispatcher slow?

2012-10-11 Thread Alex Gaynor
On Thu, Oct 11, 2012 at 6:52 AM, Daniel Sokolowski < daniel.sokolow...@klinsight.com> wrote: > I absolutely agree with: if we were looking for speed we wouldn't use > python at all (period). > > Speak for yourself. Alex -- "I disapprove of what you say, but I will defend to the death your rig

Re: URL dispatcher slow?

2012-10-11 Thread Tom Evans
On Wed, Oct 10, 2012 at 7:52 AM, Moonlight wrote: > Here is an article comparing various URL dispatchers: > > http://mindref.blogspot.com/2012/10/python-web-routing-benchmark.html > > What cause django URL dispatcher that much... slow? > Now that I've looked in detail at the test, it is because t

Re: URL dispatcher slow?

2012-10-11 Thread Daniel Sokolowski
I absolutely agree with: if we were looking for speed we wouldn't use python at all (period). From: Florian Apolloner Sent: Wednesday, October 10, 2012 6:29 PM To: django-developers@googlegroups.com Subject: Re: URL dispatcher slow? Oh cmon, please stop playing a socket puppet for the wheezy.

Re: URL dispatcher slow?

2012-10-11 Thread Yo-Yo Ma
I only now realized that this thread had started in a bit of a trolling fashion, and that there was a similar thread this week. That helps to explain the slightly more defensive stance. Django can survive (and thrive) just fine in its current, reasonably performant state, but performance should

Fw: URL dispatcher slow?

2012-10-11 Thread Kkk Kkk
somehow it went to wrong address... sorry, here it is. - Forwarded Message - >This is why I disagree with your conjecture that because Django is >slower than another framework, therefore Django is slow. That is not >what is shown, only that the other frameworks do certain things > faster

Re: URL dispatcher slow?

2012-10-11 Thread Moonlight
> > So, the benchmarks are interesting. They tell us which stacks are > fully featured, and which stacks are very lightweight. Apart from > that, they don't tell us much at all - is Django's template engine > slow, or is it about right for the work it does? This benchmark > doesn't tell us tha

Django 1.5: AUTH_USER_MODEL and GeoManager

2012-10-11 Thread Max
Hi there, this is my first post here; hope I'm posting to the right group. I'm currently working on getting to run an 1.4-application (using a profile model) on 1.5dev, using the the new (eagerly awaited by me) custom user model. I used django.contrib.gis.db.GeoManager with my former profile-Mode

Re: URL dispatcher slow?

2012-10-11 Thread Moonlight
Well I am not that good to get it fixed it django... it quite easy get lost there. But I definitely would appreciate if someone from core team I guess or in the community finally have a look there... That said, if you really think Django's urlresolver is to slow, go ahead, > profile it and

Re: Schema Alteration update

2012-10-11 Thread Luke Plant
On 28/09/12 08:41, Andrew Godwin wrote: > Yeah, I think I mentioned it a couple of times at DjangoCon but perhaps > not loudly enough - Jacob and I had a talk at DjangoCon EU where he said > he wanted it all in core, and I tend to agree. > > Preston has had a look at what I'm doing/planning with A

Re: URL dispatcher slow?

2012-10-11 Thread Tom Evans
On Thu, Oct 11, 2012 at 7:02 AM, Yo-Yo Ma wrote: > Why does every conversation about Django's performance met with "GTFO we > don't care"? (that was a rhetorical question :). I'd venture to guess that > most "It's fast enough for me!" responses are predicated on experiences that > can be likene

Re: URL dispatcher slow?

2012-10-11 Thread Russell Keith-Magee
On Thu, Oct 11, 2012 at 2:02 PM, Yo-Yo Ma wrote: > Why does every conversation about Django's performance met with "GTFO we > don't care"? (that was a rhetorical question :). Ok - If this is where the conversation is starting, it's going to go downhill *very* fast. Consider this a warning to *e

Re: URL dispatcher slow?

2012-10-11 Thread Florian Apolloner
Hi, I won't answer your rheotircal questions ;) On Thursday, October 11, 2012 8:02:19 AM UTC+2, Yo-Yo Ma wrote: > > BUT... Django is NOT that fast. > We do know that (you know that and probably everyone else too) and I already said in my post that Django isn't the fastest framework out there.