IIS + ASP + <#@Language=Python#>== performance_hit 
Author Message
 IIS + ASP + <#@Language=Python#>== performance_hit

A similar thread started here a few weeks ago, then seemed to die.  There
was no definitive answer, though.

I've noticed a *definite* performance hit from my ISP when their IIS

a consistent 7-8 second delay while serving such pages.  Pages that don't
use this directive, or that specify VBScript or JavaScript, don't suffer
the same fate.  

I tested with an ASP page that looks like this:


  <!-- or VBScript or JavaScript or nothing at all -->
  <html>
  <head>
  <body>

  <p>This is a test

  </body>
  </html>


delay for VBScript, JavaScript or when the Language directive is skipped
completely.

A previous suggestion was to change the default language for the site
from VBScript (or JavaScript) to Python.  Did anyone try this?  Does this
actually work? If not, does anyone have any other suggestions?   Could
some portion of the python run-time be recompiling on each call (i.e.,  
IUSR_COMPUTERNAME doesn't have write access to a directory on PYTHONPATH
and the .pyc files are never created)?

My ISP tends to be slow to respond to requests, so before I ask them to
monkey around with my site's IIS settings, I'd like to know if what I'm
asking for will actually work.

Thanks in advance.

-=< tom >=-
Thomas D. Funk                           |       "Software is the lever

Software Engineering Consultant          |
Advanced Systems Design, Tallahassee FL. |



Mon, 12 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
Maybe it is a version issue?

What version of python are they running?

I get sub 1 second responses with ASP and python using the

john



Quote:

> A similar thread started here a few weeks ago, then seemed to die.
There
> was no definitive answer, though.

> I've noticed a *definite* performance hit from my ISP when their IIS

be
> a consistent 7-8 second delay while serving such pages.  Pages that
don't
> use this directive, or that specify VBScript or JavaScript, don't
suffer
> the same fate.

> I tested with an ASP page that looks like this:


>   <!-- or VBScript or JavaScript or nothing at all -->
>   <html>
>   <head>
>   <body>

>   <p>This is a test

>   </body>
>   </html>

> This page should load nearly instantaneously.  However, using Python
with

*discernable*
> delay for VBScript, JavaScript or when the Language directive is
skipped
> completely.

> A previous suggestion was to change the default language for the site
> from VBScript (or JavaScript) to Python.  Did anyone try this?  Does
this
> actually work? If not, does anyone have any other suggestions?   Could
> some portion of the Python run-time be recompiling on each call (i.e.,
> IUSR_COMPUTERNAME doesn't have write access to a directory on
PYTHONPATH
> and the .pyc files are never created)?

> My ISP tends to be slow to respond to requests, so before I ask them
to
> monkey around with my site's IIS settings, I'd like to know if what
I'm
> asking for will actually work.

> Thanks in advance.

> -=< tom >=-
> Thomas D. Funk                           |       "Software is the
lever

for."
> Software Engineering Consultant          |
> Advanced Systems Design, Tallahassee FL. |

--

Sent via Deja.com http://www.deja.com/
Before you buy.



Mon, 12 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit

Quote:

> A previous suggestion was to change the default language for the
site
> from VBScript (or JavaScript) to Python.  Did anyone try this?  Does
this
> actually work?

That would be interesting to know!

Quote:
> Could
> some portion of the Python run-time be recompiling on each call
(i.e.,
> IUSR_COMPUTERNAME doesn't have write access to a directory on
PYTHONPATH
> and the .pyc files are never created)?

Highly unlikely.  No pycs need to be created for each request.  The
.pyc files should have been created at installation
(win32comext\axscript\*.pyc /s).

My guess is that Python is being reloaded each time.  But 8 seconds
still seems very slow for this.  Also, the way the code is currently
setup, Python should never actually get unloaded.

I would personally just add some debug statements to pythoncom15.dll
to report its progress.  The code already has "log to the event log"
capabilities, and would not be difficult to do.  However, this doesnt
work for your ISP, and I dont have time to do all this work (ie, the
testing/measuring) myself right now...

Mark.



Mon, 12 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
Try my python15.dll at http://www.concentric.net/~Jjlucsy/python15.dll and
see if it helps. Basica1ly it uses delay loading of some of the dlls to
speed load time.

--



Mon, 12 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
As a matter of interest, is there any functional difference between


as used by John, and expected according to all ASP materials I have seen, and


as used by tom in his original post?

regards
 Steve

Quote:

> Maybe it is a version issue?

> What version of python are they running?

> I get sub 1 second responses with ASP and python using the

> john



> > A similar thread started here a few weeks ago, then seemed to die.
> There
> > was no definitive answer, though.

> > I've noticed a *definite* performance hit from my ISP when their IIS

> be
> > a consistent 7-8 second delay while serving such pages.  Pages that
> don't
> > use this directive, or that specify VBScript or JavaScript, don't
> suffer
> > the same fate.

> > I tested with an ASP page that looks like this:


> >   <!-- or VBScript or JavaScript or nothing at all -->
> >   <html>
> >   <head>
> >   <body>

> >   <p>This is a test

> >   </body>
> >   </html>

> > This page should load nearly instantaneously.  However, using Python
> with

> *discernable*
> > delay for VBScript, JavaScript or when the Language directive is
> skipped
> > completely.

> > A previous suggestion was to change the default language for the site
> > from VBScript (or JavaScript) to Python.  Did anyone try this?  Does
> this
> > actually work? If not, does anyone have any other suggestions?   Could
> > some portion of the Python run-time be recompiling on each call (i.e.,
> > IUSR_COMPUTERNAME doesn't have write access to a directory on
> PYTHONPATH
> > and the .pyc files are never created)?

> > My ISP tends to be slow to respond to requests, so before I ask them
> to
> > monkey around with my site's IIS settings, I'd like to know if what
> I'm
> > asking for will actually work.

> > Thanks in advance.

> > -=< tom >=-
> > Thomas D. Funk                           |       "Software is the
> lever

> for."
> > Software Engineering Consultant          |
> > Advanced Systems Design, Tallahassee FL. |

> --

> Sent via Deja.com http://www.deja.com/
> Before you buy.

--
"If computing ever stops being fun, I'll stop doing it"


Tue, 13 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
The other style doesn't work for me (treats it as html),

I thought it was odd also, which is why I included the means I use. It's
probably just a typo on his part.

john


Quote:

> As a matter of interest, is there any functional difference between


> as used by John, and expected according to all ASP materials I have
seen, and


> as used by tom in his original post?

> regards
>  Steve


> > Maybe it is a version issue?

> > What version of python are they running?

> > I get sub 1 second responses with ASP and python using the

> > john



> > > A similar thread started here a few weeks ago, then seemed to die.
> > There
> > > was no definitive answer, though.

> > > I've noticed a *definite* performance hit from my ISP when their
IIS

seems to
> > be
> > > a consistent 7-8 second delay while serving such pages.  Pages
that
> > don't
> > > use this directive, or that specify VBScript or JavaScript, don't
> > suffer
> > > the same fate.

> > > I tested with an ASP page that looks like this:


> > >   <!-- or VBScript or JavaScript or nothing at all -->
> > >   <html>
> > >   <head>
> > >   <body>

> > >   <p>This is a test

> > >   </body>
> > >   </html>

> > > This page should load nearly instantaneously.  However, using
Python
> > with

> > *discernable*
> > > delay for VBScript, JavaScript or when the Language directive is
> > skipped
> > > completely.

> > > A previous suggestion was to change the default language for the
site
> > > from VBScript (or JavaScript) to Python.  Did anyone try this?
Does
> > this
> > > actually work? If not, does anyone have any other suggestions?
Could
> > > some portion of the Python run-time be recompiling on each call
(i.e.,
> > > IUSR_COMPUTERNAME doesn't have write access to a directory on
> > PYTHONPATH
> > > and the .pyc files are never created)?

> > > My ISP tends to be slow to respond to requests, so before I ask
them
> > to
> > > monkey around with my site's IIS settings, I'd like to know if
what
> > I'm
> > > asking for will actually work.

> > > Thanks in advance.

> > > -=< tom >=-
> > > Thomas D. Funk                           |       "Software is the
> > lever

> > for."
> > > Software Engineering Consultant          |
> > > Advanced Systems Design, Tallahassee FL. |

> > --

> > Sent via Deja.com http://www.deja.com/
> > Before you buy.

> --
> "If computing ever stops being fun, I'll stop doing it"

--

Sent via Deja.com http://www.deja.com/
Before you buy.



Tue, 13 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit

In an article posted Thu, 24 Feb 2000 23:19:41 GMT,

Quote:
> Maybe it is a version issue?

> What version of python are they running?

> I get sub 1 second responses with ASP and python using the

> john

1.5.2 (blah-blah-blah) -- I made a page the imported sys.py and printed
sys.version.

Good idea....

Thx.

--
-=< tom >=-

Software Engineering Consultant          | Archimedes was searching for"
Advanced Systems Design, Tallahassee FL. |



Sat, 17 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
[This followup was posted to comp.lang.python and a copy was sent to the
cited author.]

In an article posted Thu, 24 Feb 2000 23:37:01 GMT,

[re: effect of setting IIS default language to Python]

Quote:
> That would be interesting to know!

I'll see if I can get them to do this, but I was actually hoping someone
here could try it for me and report back.  Sadly, I now appear to be the
only one having this problem.

Quote:
> My guess is that Python is being reloaded each time.  But 8 seconds
> still seems very slow for this.  

Seems pretty slow to me, too.

Quote:
> I would personally just add some debug statements to pythoncom15.dll
> to report its progress.  

Probably not an option.  I can't imagine I could get them to replace a
Python DLL and then restore the original later.

I once lost FTP access to my site and it took them a month to restore it.  
Also, I've downloaded the FrontPage 2K Server Extensions to my FTP
directory for them to install and I've been waiting now for two weeks....
<sigh>

Quote:
> However, this doesnt work for your ISP, and I dont have time to do all
> this work (ie, the testing/measuring) myself right now...

I understand, Mark.  No need, anyway, methinks.  We should be able to
figger this out.  Thanks for thinking about it, though.

--
-=< tom >=-
Thomas D. Funk                           |        "Software is the lever
Software Engineering Consultant          | Archimedes was searching for"
Advanced Systems Design, Tallahassee FL. |



Sat, 17 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
Joel:

In an article posted Thu, 24 Feb 2000 18:49:00 -0500,

Quote:
> Try my python15.dll at http://www.concentric.net/~Jjlucsy/python15.dll and
> see if it helps. Basica1ly it uses delay loading of some of the dlls to
> speed load time.

I'll keep this in mind.  

However, getting this done would take an act of Congress.  My ISP is
supporting Python as a kind of trial, and I don't want to rock the boat
with too many "special requests."  Besides, they're slow-slow-slow at
getting anything done.  It'd take forever.

However, thank you for the offer.

--
-=< tom >=-
Thomas D. Funk                           |        "Software is the lever
Software Engineering Consultant          | Archimedes was searching for"
Advanced Systems Design, Tallahassee FL. |



Sat, 17 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
Steve:

In an article posted Fri, 25 Feb 2000 14:48:51 GMT,

Quote:
> As a matter of interest, is there any functional difference between


> as used by John, and expected according to all ASP materials I have seen, and


> as used by tom in his original post?

> regards

Uh... LOTS of difference!  What I originally worte was *completely*
incorrect.... Sorry.  I wrote it wrong once and then copied the incorrect
code all over my post.  

Thank you for the correction.

--
-=< tom >=-

Software Engineering Consultant          | Archimedes was searching for"
Advanced Systems Design, Tallahassee FL. |



Sat, 17 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
John:

In an article posted Fri, 25 Feb 2000 20:57:56 GMT,

Quote:
> The other style doesn't work for me (treats it as html),

> I thought it was odd also, which is why I included the means I use. It's
> probably just a typo on his part.

Part typo, part drain-bamage [sic] (i.e., write it once incorrectly and
then copy the stew out of it.... ouch!)

Next time, I'll copy the code directory from the source.  hehehe

-=< tom >=-
Thomas D. Funk                           |        "Software is the lever
Software Engineering Consultant          | Archimedes was searching for"
Advanced Systems Design, Tallahassee FL. |



Sat, 17 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
Another thing to do is import time and
print err I mean Response.Write
str(time.strftime('%H:%M:%S',time.localtime(time.time())))
I'm curious if python starts on time, but you don't see the page several
seconds later.

Also, print out your paths, maybe some path information is screwed up.

And did you look at all of your SeverVariables?

This puts all of the SeverVariables in a nice python dictionary:

d_env={} #initialize dictionary
for key in Request.ServerVariables:
     d_env[key]=str(Request.ServerVariables(key))

How much of the setup do you know about?
Do they have something silly like python installed on a busy remote
share?

john



Quote:

> 1.5.2 (blah-blah-blah) -- I made a page the imported sys.py and
printed
> sys.version.

> Good idea....

> Thx.

> --
> -=< tom >=-

lever
> Software Engineering Consultant          | Archimedes was searching
for"
> Advanced Systems Design, Tallahassee FL. |

--

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 18 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
Another thing to do is import time and
print err I mean Response.Write
str(time.strftime('%H:%M:%S',time.localtime(time.time())))
I'm curious if python starts on time, but you don't see the page several
seconds later.

Also, print out your paths, maybe some path information is screwed up.

And did you look at all of your SeverVariables?

This puts all of the SeverVariables in a nice python dictionary:

d_env={} #initialize dictionary
for key in Request.ServerVariables:
     d_env[key]=str(Request.ServerVariables(key))

How much of the setup do you know about?
Do they have something silly like python installed on a busy remote
share?

john



Quote:

> 1.5.2 (blah-blah-blah) -- I made a page the imported sys.py and
printed
> sys.version.

> Good idea....

> Thx.

> --
> -=< tom >=-

lever
> Software Engineering Consultant          | Archimedes was searching
for"
> Advanced Systems Design, Tallahassee FL. |

--

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 18 Aug 2002 03:00:00 GMT  
 IIS + ASP + <#@Language=Python#>== performance_hit
I did post in a similar thread regarding this issue but received no
useful response. Basically, what I've done is the following:

Using both MSFT's WCAT and WAST, I did some benchmarking with 10 asp
pages that performed various functions including recursive computation,
session object creation and others. The scripting languages I tested
were Python, VBScript, PerlScript and JScript. The following is a
snippet of the results of the top 2 performing scripting languages:

VBScript:
Number of hits:               26604
Requests per Second:          44.34

Socket Statistics
-----------------------------------------------------------------------
Socket Connects:              26604
Total Bytes Sent (in KB):     12923.05
Bytes Sent Rate (in KB/s):    21.54
Total Bytes Recv (in KB):     33137.40
Bytes Recv Rate (in KB/s):    55.23

JScript:
Number of hits:               20091
Requests per Second:          33.49

Socket Statistics
--------------------------------------------------------------------
Socket Connects:              20091
Total Bytes Sent (in KB):     10660.20
Bytes Sent Rate (in KB/s):    17.77
Total Bytes Recv (in KB):     25211.17
Bytes Recv Rate (in KB/s):    42.02

Both PerlScript and Python resulted in slightly poorer performance than
JScript. Because there is a cost involved in processing the language
directive in an asp page, I set each scripting language as the default
in the Internet Services Manager for the respective test and omitted
the Language tag altogether...similar results. This is unfortunate
considering that Python has such an attractive library that provides
much more functionality than either VBScript or JScript.

Anyone had similar results or explantions for this obvious MSFT slight?



Quote:

> A similar thread started here a few weeks ago, then seemed to die.
There
> was no definitive answer, though.

> I've noticed a *definite* performance hit from my ISP when their IIS

to be
> a consistent 7-8 second delay while serving such pages.  Pages that
don't
> use this directive, or that specify VBScript or JavaScript, don't
suffer
> the same fate.

> I tested with an ASP page that looks like this:


>   <!-- or VBScript or JavaScript or nothing at all -->
>   <html>
>   <head>
>   <body>

>   <p>This is a test

>   </body>
>   </html>

> This page should load nearly instantaneously.  However, using Python
with

*discernable*
> delay for VBScript, JavaScript or when the Language directive is
skipped
> completely.

> A previous suggestion was to change the default language for the site
> from VBScript (or JavaScript) to Python.  Did anyone try this?  Does
this
> actually work? If not, does anyone have any other suggestions?
Could
> some portion of the Python run-time be recompiling on each call
(i.e.,
> IUSR_COMPUTERNAME doesn't have write access to a directory on
PYTHONPATH
> and the .pyc files are never created)?

> My ISP tends to be slow to respond to requests, so before I ask them
to
> monkey around with my site's IIS settings, I'd like to know if what
I'm
> asking for will actually work.

> Thanks in advance.

> -=< tom >=-
> Thomas D. Funk                           |       "Software is the
lever

for."
> Software Engineering Consultant          |
> Advanced Systems Design, Tallahassee FL. |

Sent via Deja.com http://www.deja.com/
Before you buy.


Fri, 23 Aug 2002 03:00:00 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. ><><><><>Heeeeeeeeeeeeeeelp on INT 14!><><><><><>

2. <<<<<YOU MUST CHECK THIS OUT >>>>>>>>>> 2103

3. <><><> FLOODFILL <><><>

4. >>>HELP, DECOMPILER<<<

5. <<<XXX Password>>>

6. >>>>>>>>>>>>>>>>>>>HEY!<<<<<<<<<<<<<<<<<<<<<<<

7. <<<XXX Password>>>

8. ??? <<<<<<<<<<<<<<<<<<<< RGB 4 MMX >>>>>>>>>>>>>>>>>>>>>>>?

9. <<<XXX Password>>>

10. ??? <<<<<<<<<<<<<<<<<<<< RGB 4 MMX >>>>>>>>>>>>>>>>>>>>>>>?

11. using com object written in python from iis/asp

 

 
Powered by phpBB® Forum Software