Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 134039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:32:29+00:00 2026-05-11T06:32:29+00:00

Today I was tasked to improve the performance of a classic ASP page. Rewriting

  • 0

Today I was tasked to improve the performance of a classic ASP page. Rewriting the code in ASP.NET is at this moment not an option so I took up the challenge to squeeze every ounce of performance I can get out of the page.

The page consists of the basic ‘SELECT bla bla FROM bla’ into a couple of recordssets. A while loop iterates through those recordsets and dumps <tr><td> strings. Within the while loop there is a bunch of conditionals and whatnot. There are 3 subroutines that are called which use global variables (not local variables passed as parameters).

So nothing really shocking or anything. Before I started my optimization the loop took around 15 seconds to complete. Of the 15 seconds around 6 were taken up by the sql query.

After changing a few things around I managed to get it around to 7 seconds.

The things that I have changed around are:

  • Instead of doing SELECT *, I selected only the columns that I needed. The query went down to on average 4 seconds. It’s a pretty heavy query with views within views.

  • I removed all the context switching within the loop. So I changed things like <%= bla %> to Response.Write(bla).

  • The 3 subroutines were defined as functions, but they were used as sub (with no result). So I changed the functions to subs. Does that help?

After making my changes I found that most of the time was taken up by one of the subroutines. I didn’t have time enough today to change the subroutine, but it consists of things like:

  • Date functions: Dateadd, Datediff
  • Array functions: Ubound(arr) and index referencing: arr(I)
  • String functions: left, mid, right, lower, replace

With every page call, that subroutine is run around 1600 times.

Anybody out there have any experience with optimizing classic asp pages? Do you have any good tips for optimization? What I’m looking for is improvement of code within a do … loop statement.

I’m an experienced ASP.NET developer and know quite a bit about perfomance improvement in ASP.NET. Classic ASP uses a different ‘engine’ so I was wondering if anybody out there have any insights into improving the performance of classic ASP.

Thanks!

M

PS: Yes I know that classic ASP uses VBScript

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T06:32:29+00:00Added an answer on May 11, 2026 at 6:32 am

    GetRows This will create the speed you seek. Here are some other tips I have used.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today in my code im downloading the images from a website like this: using
Today I've got confused with 2 issues related to the HttpApplicationState of ASP.net. My
Today's problem in my code is kind of strange, and I could not reproduce
Today at school the teacher asked us to implement a duplicate-deletion algorithm. It's not
Today I noticed a snippet of code that looks like the one below: public
Today I started observing some new kind of error which does not allow me
Today I was tasked with working with the Google API for the first time
When doing a code review for a colleague today I saw a peculiar thing.
Today I was writing some C code to sort an array of structs using
Today I've got this class: public class SmtpEmailProvider : IMessageProvider { private readonly SmtpClientWrapper

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.