Re: URL dispatcher slow?

2012-10-16 Thread Moonlight
static[0] 138017 function calls in 0.818 seconds Ordered by: internal time List reduced from 79 to 10 due to restriction <10> ncalls tottime percall cumtime percall filename:lineno(function) 10000.0620.0000.4900.000 base.py:72(get_response)

Re: URL dispatcher slow?

2012-10-12 Thread Tom Evans
On Thu, Oct 11, 2012 at 10:58 PM, Łukasz Rekucki wrote: > 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

Re: URL dispatcher slow?

2012-10-12 Thread Moonlight
> FWIW, here's a link to a cProfile result for the mentioned > benchmark[1] on Django 1.4.1 and CPython 2.7.3. A quick look shows > that we're calling get_language() 1.5mln times (read: for every > pattern), so that's definitely going to slow down things. > Happy to see we moved it a bit

Re: URL dispatcher slow?

2012-10-12 Thread Tom Evans
On Thu, Oct 11, 2012 at 2:53 PM, 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 >> >>

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

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:

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?

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

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

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 <daniel.soko

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

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

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

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

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

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: 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

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.

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.

Re: URL dispatcher slow?

2012-10-11 Thread Alex Ogier
On Wed, Oct 10, 2012 at 6:29 PM, Florian Apolloner wrote: > That said, if you really think Django's urlresolver is to slow, go ahead, > profile it and improve it, we certainly won't say no to speed improvements… > That's not really fair. Django core *will* say no to speed

Re: URL dispatcher slow?

2012-10-11 Thread Yo-Yo Ma
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 likened to personal blog development, rather than large scale,

Re: URL dispatcher slow?

2012-10-10 Thread Florian Apolloner
Oh cmon, please stop playing a socket puppet for the wheezy.web author. A web framework consists of more than just a win in speed (an the author of wheezy.web can argue whatever he wants that "basic" stuff stuff should be fast) -- if we were looking for speed we wouldn't use python at all

Re: URL dispatcher slow?

2012-10-10 Thread Daniel Sokolowski
Yes, wheezy.web is much more bare metal compared to Django : http://packages.python.org/wheezy.web/tutorial.html From: Daniel Sokolowski Sent: Wednesday, October 10, 2012 10:32 AM To: django-developers@googlegroups.com Subject: Re: URL dispatcher slow? The middlewares appear to be disabled

Re: URL dispatcher slow?

2012-10-10 Thread Daniel Sokolowski
take convenience as speed has not been a issue to me, but one thing though is that these benchmarks are transparent enough to give them some validity. From: Aymeric Augustin Sent: Wednesday, October 10, 2012 9:30 AM To: django-developers@googlegroups.com Subject: Re: URL dispatcher slow

Re: URL dispatcher slow?

2012-10-10 Thread Aymeric Augustin
2012/10/10 Moonlight > 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? Django's URL dispatcher is more complex than others. It