We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

ASP classic “execute” is incredibly slow on local serverRSS

3 replies

Last post Sep 19, 2018 10:19 PM by RobSimpson

  • ASP classic “execute” is incredibly slow on local server

    Feb 08, 2018 11:59 AM|Nientezero|LINK

    <div class="post-text" itemprop="text">

    I am executing these two cycles in Classic ASP:

    for g=1 to 5000
        dummy=1
    next
    

    and

    for g=1 to 5000
        execute("dummy=1")
    next
    

    On cloud server (Windows 2008 with IIS 7.5) these two cycles are executed in 0 seconds. On a local powerful machine (with Windows 10) the first cycle is executed in 0 seconds, the second one in about 40 seconds. And every time I relaunch the same script, the execution time increases by some seconds!!

    Tried on a second Windows 10 machine (IIS 10.0), same results.

    Cannot understand what is happening, any ideas?

    This is the script I'm using for testing:

    <%
    server.scripttimeout=9000000
    
    starttime=now()
    response.write "<b>Default method</b><br>Start time: "&starttime
    response.flush  
    
    for g=1 to 5000
        dummy=1
    next
    
    response.write "<br>End time: "&now()
    response.write "<br>Time elapsed: "&datediff("s",starttime,now())&" seconds"
    
    starttime=now()
    response.write "<br><br><b>Execute method</b><br>Start time: "&starttime
    response.flush  
    
    for g=1 to 5000
        execute("dummy=1")
    next
    
    response.write "<br>End time time: "&now()
    response.write "<br>Time elapsed: "&datediff("s",starttime,now())&" seconds"
    %>

    Please help!!! smile
    </div>
  • Re: ASP classic “execute” is incredibly slow on local server

    Feb 09, 2018 07:21 AM|Yuk Ding|LINK

    Hi Nientezero,

    Your code execute the execute() method 5000 times. If I only execute it hundreds times or sever times, it return 0 second. Only when I execute 5000 times, it return 5s time taken. Different method with different source code different algorithm could have different execution performance. And it should not be an IIS issue. In addition, the different hardware also provide the different operation performance.

    Best Regards,

    Yuk Ding

    Yuk Ding

    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue.
  • Re: ASP classic “execute” is incredibly slow on local server

    Sep 07, 2018 12:57 PM|Kapox|LINK

    Thank you Yuk Ding for your answer.

    Your result (5 seconds) confirms that there is definitely something not working in IIS 10.0 and/or Windows 10.

    I tried the same test on a Windows Server 2008 server running IIS 7.5, and even increasing the cycle by 100 times (500,000 iterations) the time taken is just 2 seconds.

  • Re: ASP classic “execute” is incredibly slow on local server

    Sep 19, 2018 10:19 PM|RobSimpson|LINK

    Watch your Task Manager under the Processes tab.  When I run your code on my Win10 box, I notice the Antimalware Service Executable start using up CPU aggressively, then slacks off.  I do not get the same lag as you, i.e. 40 seconds.  More like 5-10 at most.