Wednesday, February 25, 2015

Re: Python / Django slow ? Deciding my next technological stack

On 2/25/2015 6:27 AM, Tom Evans wrote:
> On Tue, Feb 24, 2015 at 11:30 PM, Benj <webkoros@gmail.com> wrote:
>> Hi,
>> i'm going to invest lots of time and energy in various web projects (mostly
>> community web sites), and want to pick up a language / framework and invest
>> heavily on it.
>> I've spent a lot of time evaluating the various options, and narrowed my
>> choice to 2 stacks: C sharp asp.net MVC or Python / Django.
>>
>> I'm more attracted to Python / Django combo, because of the Python language,
>> and high level framework Django. I really want to use these.
>> My only concern is speed. I read that Python can't run concurrent tasks, is
>> this true ? So a multi-processor with hyperthreads won't benefit the stack
>> and even slow it down ?
>> I have no clue how this translates in reality, but should I expect noticable
>> performance difference on a same server, shall I use Python / Django than if
>> I had C Sharp Asp.net ?
>> I don't want to invest lots of time and efforts only to discover in the end
>> that the site is slow.
>> You that have real world experiences with running sites, what are your
>> conclusions ?
>>
>>
>> I expect sites to be medium traffic: could be handled by a good dedicated
>> server or average cloud ressources.
>>
>> Benj
> Unless you are producing web-scale sites (gmail, ebay, instagram), the
> speed of your website will depend more upon what you do with a
> framework than the framework you choose.
>
> If you are producing web-scale sites, then whatever framework you
> choose you will need to make the right design decisions and/or
> compromises.
>
> Even with the best framework in the world, if you design the
> architecture of a website poorly, the website will be slow.
>
> Even less important than the choice of framework is the choice of
> hosting container for your framework. If you ever get to the point
> where the speed of your wsgi container is the thing that is holding
> you back, well done, now you should spend some time looking at it.
> Until then, use the way that is easiest for you.
>
> Cheers
>
> Tom

I recently came across a recent article addressing many of common myths
about Python. I recommend giving it a read:
https://www.paypal-engineering.com/2014/12/10/10-myths-of-enterprise-python/

As Tom says, it's mostly a matter of how you use the language. You can
write slow assembly and you can write fast Python. There are certain
areas where writing code in another language will yield significant
performance advantages, but for that most part, much of what you'd want
to do has already been efficiently implemented in C and made available
in Python. E.g., numpy (actually some of this is Fortran, too), scipy,
Pillow (for image processing), et. al.

My general thought is that if it works for Instagram (any many other
high-traffic services), it'll probably work for whatever I'm doing.

_Nik

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/54EDFF29.5070908%40consbio.org.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment