PythonWin ASP performance

Jim Abrams jim at publishingresources.com
Wed Oct 17 15:25:52 EDT 2001


afaus at corp.vlex.com (Angel Faus) wrote in <7a7a07a.0110170719.7a347008
@posting.google.com>:

> Hi to all,
> 
> I work in a project that has already a significative investment in ASP
> (vbScript) and COM development.
> 
> We are already using Python in some parts of the development and we
> love it.
> 
> But current Python+ASP development has ocurrend in backend tools that
> support a moderate level of traffic. We are afraid that using Python
> instead of vbScript in "key" parts of the site (that support >70% of
> our traffic, and our total traffic is not small) could be bad for
> perfomance.
> 
> So de question is: ¿is Python slower than vBscript in ASP? 
> and more important: ¿does Python+ASP scale well, or does it generate
> nasty conditions when used intensively?
> 
> and finally: ¿is it mixing Python and vBscript in the same page slower
> or more problematic than just using Python?
> 
> Thanks in advance,

I think you'll be much better off using Python. I can't give you any hard 
data comparisons (since I abandoned VB long ago) But our python ASP pages 
scale very well (at least under the load-testing we do). And back in the day 
when I wasn't much of a Python programmer, my python pages were still faster 
than my VBscript pages (and usually about 1/3 to 1/2 as long).

Using Python makes life easier in so many ways I can't even begin to 
describe them all, but some of the main ones are the object oriented 
approach. (We've encapsulated the ASP Built-in objects with Python wrappers 
that solve alot of VBscript ickiness, and are subclassable)

DB access is faster using ADO, (we actually use win32com.client.Dispatch 
rather than Server.CreateObject, anyone know why Dispatch is faster?)

The Python library gives untold of power over VBScript. 
With all the additional power Python gives you, as well as still being able 
to utilize COM pieces, I usually ask myself, "Why us VBscript at all?"

Lastly, mixing script languages in a single page is usually a bad idea.
There's a MS KB article that describes it (only talks about Jscript and 
VBscript tho), but IIRC, the order the script blocks are executed isn't 
always defined and you're instatiating 2 script engines for the page rather 
than 1. Check the KB for more info.

Hope this was of some help, 

J



More information about the Python-list mailing list