473,780 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Massive speed difference between identical asp pages

I have a page that produces little thumbnails of the 3D models it
finds in a specified directory (and iterates down through any sub
directories).

It basically scans each directory for 3D Studio Max files using the
filesystemobjec t and writes an activeX component called iDrop for each
file so it can be displayed on the page (and drag-dropped straight
into Max). If it happens to find a similarly named XML file in the
directory, it loads that and transforms the content with a pre-loaded
XSL stylesheet to provide a summary of the model's size/face
count/etc. This is just for context though, just in case it is
relevant.

In response to complaints that it was running really slowly (from 6 to
13 seconds to scan a directory with 3 models in it), I made a copy of
the page to add debug timers to, so I could see where it was taking
all the time.

This copy completes in between 0.3 and 0.6 seconds for the same
directory.

The code is identical. I can cut and paste the code from the slow file
to the fast one (or vice versa) and it makes no difference to the
execution speed of either file. They both execute using the IUSR_foo
account on the webserver. They are both in the same directory. The
directory they are reading from has read permission for "Everyone".

What gives? How is this possible? What is IIS doing differently for
the two pages? Surely IIS should recompile a page if its modified date
changes, so how can it compile two different execution schemes for the
same code?

The fix for me is to use the new page and not the old one, but I
really want to know what is going on here.

Server is IIS5.0 on Windows 2000 Server
Jul 22 '05 #1
12 2047
Have you found where exactly the time difference is ?

For now it looks like to me that you see fast running server side code under
all circumstances. If yes , the delay experienced by users is IMO the time
taken to download all the 3D models so that they can be viewed by the
(multiple) ActiveX control(s) hosted in your HTML page...

If yes, you could try to donwload only those models the user actually wants
to use...

Patrice

--

"MikeT" <ne**@chthonic. f9.co.uk> a écrit dans le message de
news:af******** *************** ***@posting.goo gle.com...
I have a page that produces little thumbnails of the 3D models it
finds in a specified directory (and iterates down through any sub
directories).

It basically scans each directory for 3D Studio Max files using the
filesystemobjec t and writes an activeX component called iDrop for each
file so it can be displayed on the page (and drag-dropped straight
into Max). If it happens to find a similarly named XML file in the
directory, it loads that and transforms the content with a pre-loaded
XSL stylesheet to provide a summary of the model's size/face
count/etc. This is just for context though, just in case it is
relevant.

In response to complaints that it was running really slowly (from 6 to
13 seconds to scan a directory with 3 models in it), I made a copy of
the page to add debug timers to, so I could see where it was taking
all the time.

This copy completes in between 0.3 and 0.6 seconds for the same
directory.

The code is identical. I can cut and paste the code from the slow file
to the fast one (or vice versa) and it makes no difference to the
execution speed of either file. They both execute using the IUSR_foo
account on the webserver. They are both in the same directory. The
directory they are reading from has read permission for "Everyone".

What gives? How is this possible? What is IIS doing differently for
the two pages? Surely IIS should recompile a page if its modified date
changes, so how can it compile two different execution schemes for the
same code?

The fix for me is to use the new page and not the old one, but I
really want to know what is going on here.

Server is IIS5.0 on Windows 2000 Server

Jul 22 '05 #2
Rename the "slow" file, then make a copy of the "fast" file with the "slow"
file name. Is it still slow?

Are you calling both files exactly the same way (by a link, form post, etc)?
If you are calling by a link or form post swap the links and see if the
performance problem follows the link.

--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

"MikeT" <ne**@chthonic. f9.co.uk> wrote in message
news:af******** *************** ***@posting.goo gle.com...
I have a page that produces little thumbnails of the 3D models it
finds in a specified directory (and iterates down through any sub
directories).

It basically scans each directory for 3D Studio Max files using the
filesystemobjec t and writes an activeX component called iDrop for each
file so it can be displayed on the page (and drag-dropped straight
into Max). If it happens to find a similarly named XML file in the
directory, it loads that and transforms the content with a pre-loaded
XSL stylesheet to provide a summary of the model's size/face
count/etc. This is just for context though, just in case it is
relevant.

In response to complaints that it was running really slowly (from 6 to
13 seconds to scan a directory with 3 models in it), I made a copy of
the page to add debug timers to, so I could see where it was taking
all the time.

This copy completes in between 0.3 and 0.6 seconds for the same
directory.

The code is identical. I can cut and paste the code from the slow file
to the fast one (or vice versa) and it makes no difference to the
execution speed of either file. They both execute using the IUSR_foo
account on the webserver. They are both in the same directory. The
directory they are reading from has read permission for "Everyone".

What gives? How is this possible? What is IIS doing differently for
the two pages? Surely IIS should recompile a page if its modified date
changes, so how can it compile two different execution schemes for the
same code?

The fix for me is to use the new page and not the old one, but I
really want to know what is going on here.

Server is IIS5.0 on Windows 2000 Server

Jul 22 '05 #3
"Mark Schupp" <no******@email .net> wrote in message news:<um******* *******@TK2MSFT NGP11.phx.gbl>. ..

"MikeT" <ne**@chthonic. f9.co.uk> wrote in message
news:af******** *************** ***@posting.goo gle.com...
I have a page that produces little thumbnails of the 3D models it
finds in a specified directory (and iterates down through any sub
directories).

It basically scans each directory for 3D Studio Max files using the
filesystemobjec t and writes an activeX component called iDrop for each
file so it can be displayed on the page (and drag-dropped straight
into Max). If it happens to find a similarly named XML file in the
directory, it loads that and transforms the content with a pre-loaded
XSL stylesheet to provide a summary of the model's size/face
count/etc. This is just for context though, just in case it is
relevant.

Rename the "slow" file, then make a copy of the "fast" file with the "slow"
file name. Is it still slow?

The file with the "slow" name becomes slow. The one that was slow
becomes fast :) This kinda proves that it's something IIS is doing
when executing the code. The same thing happens with a second page in
the same directory that is used as a detailed view for a particular
model. Again, making a new file with a new name speeds up the code,
but the slowdown is associated with the filename and not the code
itself.
Are you calling both files exactly the same way (by a link, form post, etc)?
If you are calling by a link or form post swap the links and see if the
performance problem follows the link.

I'm typing in a direct URL to the page with the same parameter (a
directory
path to scan) for each.

Patrice wrote:
Have you found where exactly the time difference is ?

Inserting more timing checks makes it clear that one page is taking
around 2 seconds to run through the files in a directory, the other
<0.2 seconds. Specifically, it's taking a long time to get a file's
name. The code makes repeated use of objFile.Name. Caching this name
in a string (which I should have been doing anyway, doh) speeds up
BOTH pages immensely, but the slow down factor for the files is still
around 16 to 1. So it's the FileSystemObjec t that's got the problem.
Why would getting a file name be so slow?


For now it looks like to me that you see fast running server side code
under all circumstances.
Nope - the timings are being done on the server side, the activeX
loads
the models clientside, so won't slow down the execution of the ASP.
If yes, you could try to donwload only those models the user actually
wants to use...


Point taken, but this is a model library browser - they don't know
what
model they are looking for, they are browsing, say, 100 office chairs
looking
for the right one for the scheme they are modelling.
Hmm. It looks like IIS has cached something to do with the page's
name that
isn't getting reset when the page is edited. I'll try restarting the
IIS server, but if that fails I'm assuming the IIS metabase has got
corrupted for the files that were in that directory, but it's beyond
me what it might have cached that affects behaviour in this way.
Here's the code for the loop that is being so slow:
(splittime is my debug code that logs the elapsed time in milliseconds
for each call, and writeGalleryMod el just outputs the HTML based on
the available files, fso is a global fileSystemObjec t)

sub listmodelsunder (libraryroot, librarywebroot, subpath, preview)

dim thisFolder, subFolder, file
dim bestproxyfile
dim proxyfile
dim xmlfile
dim maxfile
dim vrmlfile

dim filename

set thisfolder = fso.GetFolder(l ibraryroot & subpath)
proxyfile = ""
xmlfile = ""
maxfile = ""
vrmlfile = ""

splittime(libra ryroot & subpath)
for each file in thisFolder.File s

filename = file.Name 'THIS IS THE CALL THAT TAKES 16 TIMES LONGER
ON ONE PAGE
splittime(filen ame & " start")
select case fileextension(f ilename)
case "jpg"
if proxyfile = "" then proxyfile = filename

if instr(1,filenam e,"best",1) > 0 then bestproxyfile =filename
if instr(1,filenam e,preview,1) > 0 then proxyfile = filename

case "max"
if maxfile = "" then
maxfile = filename
else
if filename = thisFolder.Name & ".max" then
maxfile = filename
end if
end if

case "xml"
if instr(1,filenam e,"fileproperti es",1) > 0 then xmlfile =
filename

case "wrl"
if vrmlfile = "" and preview = "3d" then vrmlfile = filename

end select

splittime(filen ame & " end")
next
splittime("scan complete")
if proxyfile = "" or preview = "3d" then proxyfile = bestproxyfile

if maxfile<>"" then 'this directory is a model, list it
writeGalleryMod el library & subpath, librarywebroot & subpath,
proxyfile, maxfile, xmlfile, vrmlfile
modelcount = modelcount + 1
else
for each subFolder in thisFolder.subF olders
listmodelsunder libraryroot, librarywebroot, subpath & "/" &
subFolder.Name, preview
next
end if

set thisfolder = nothing
end sub
Jul 22 '05 #4
> the two pages? Surely IIS should recompile a page if its modified date
changes,


Should != does. Did you restart IIS?
Jul 22 '05 #5
On Thu, 18 Nov 2004 09:42:49 -0500, "Aaron [SQL Server MVP]"
<te*****@dnartr eb.noraa> wrote:
the two pages? Surely IIS should recompile a page if its modified date
changes,


Should != does. Did you restart IIS?


I tried this at lunchtime - no difference to the pages at all:
anything using the original name is slow when using the
filesystemobjec t, the same code under a new name runs at normal
speed. This is getting silly.

Mike
Jul 22 '05 #6
See the last section of http://www.aspfaq.com/2022 ... you may be able to
resolve this by dropping the application and re-creating it.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"MikeT" <ne**@chthonic. f9.co.uk> wrote in message
news:0a******** *************** *********@4ax.c om...
On Thu, 18 Nov 2004 09:42:49 -0500, "Aaron [SQL Server MVP]"
<te*****@dnartr eb.noraa> wrote:
the two pages? Surely IIS should recompile a page if its modified date
changes,


Should != does. Did you restart IIS?


I tried this at lunchtime - no difference to the pages at all:
anything using the original name is slow when using the
filesystemobjec t, the same code under a new name runs at normal
speed. This is getting silly.

Mike

Jul 22 '05 #7
MikeT wrote:
On Thu, 18 Nov 2004 09:42:49 -0500, "Aaron [SQL Server MVP]"
<te*****@dnartr eb.noraa> wrote:
the two pages? Surely IIS should recompile a page if its modified
date changes,


Should != does. Did you restart IIS?


I tried this at lunchtime - no difference to the pages at all:
anything using the original name is slow when using the
filesystemobjec t, the same code under a new name runs at normal
speed. This is getting silly.

Mike

What are the filenames? (grasping at straws)
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '05 #8
On Thu, 18 Nov 2004 11:19:25 -0500, "Bob Barrows [MVP]"
<re******@NOyah oo.SPAMcom> wrote:
MikeT wrote:
On Thu, 18 Nov 2004 09:42:49 -0500, "Aaron [SQL Server MVP]"
<te*****@dnartr eb.noraa> wrote:
the two pages? Surely IIS should recompile a page if its modified
date changes,

Should != does. Did you restart IIS?


I tried this at lunchtime - no difference to the pages at all:
anything using the original name is slow when using the
filesystemobjec t, the same code under a new name runs at normal
speed. This is getting silly.

Mike

What are the filenames? (grasping at straws)


The slow ones are called gallery.asp and model.asp - both sub frames
of a simple two frame default.asp.

I copied the files and named them gallery2.asp and model2.asp and then
linked those names instead in the default.asp page to end up with a
normal running app.

So - I've 'fixed' the problem but still no closer to tracking this
down. Off to try Aaron's suggestion from the FAQ.

Mike

Jul 22 '05 #9
See Aaron's response. If that doesn't help:

Is the slow page slow when called a second time with the same parameters?
Does it make a difference which page is called first?

restart web-server (re-boot if possible)
1. call slow page
2. call fast page
restart web-server again
3. call fast page
4. call slow page

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"MikeT" <ne**@chthonic. f9.co.uk> wrote in message
news:0a******** *************** *********@4ax.c om...
On Thu, 18 Nov 2004 09:42:49 -0500, "Aaron [SQL Server MVP]"
<te*****@dnartr eb.noraa> wrote:
the two pages? Surely IIS should recompile a page if its modified date
changes,


Should != does. Did you restart IIS?


I tried this at lunchtime - no difference to the pages at all:
anything using the original name is slow when using the
filesystemobjec t, the same code under a new name runs at normal
speed. This is getting silly.

Mike

Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
5106
by: nasht | last post by:
Hi, I'm trying to make a newsletter application in php (using mail() ). This application is supposed to look in a MySQL database and generate a list of emails and first names. Then it should send an html formated message. In the theory, I know how to do that, but the hic is ... There are about 30 000 members. So I get different kind of errors everytime I try something. Like 500 Internal Server Error,
17
4025
by: Shailesh Humbad | last post by:
I just posted an article I wrote called ASP Speed Tricks. It covers techniques to optimize output of database data in HTML, for both simple tables and complex tables. More advanced ASP authors might be interested in the complex table optimizations. Please check it out at: http://www.somacon.com/aspdocs/ Hope you enjoy, Shailesh
2
1181
by: aaron | last post by:
Hello, I have two questions, first some background info: We are running SQL 2000 on a Windows 2003 server for out aircraft parts database software. There are 7 workstations (windows 2000 and XP) that run the parts database.
5
1839
by: Misiowaty | last post by:
Is there any difference in speed between for(int i=0; i<I; i++){ for(int j=0; j<J; j++){ //something } } and
9
1677
by: nicolas.hilaire | last post by:
Hi all, i need to choose a langage for porting my vb application to dot net 2.0 in november. For some components, low-level components, i want to know if it can be better to use specific .net language. Basicaly, i want to know if - managed c++ execution is faster than C# execution
10
2597
by: bear | last post by:
hi all, I have a program whose speed is so strange to me. It is maily used to calculate a output image so from four images s0,s1,s2,s3 where so=(s0-s2)^2+ (s1-s3)^2. I compile it with gcc (no optimization). the codec between /***********/ is the initialization code. What supprise me a lot is the code with initialization(io==1) is much faster than without initialization(io!=1). The initialization code should takes some time and it should...
7
3049
by: YAZ | last post by:
Hello, I have a dll which do some number crunching. Performances (execution speed) are very important in my application. I use VC6 to compile the DLL. A friend of mine told me that in Visual studio 2003 .net optimization were enhanced and that i must gain in performance if I switch to VS 2003 or intel compiler. So I send him the project and he returned a compiled DLL with VS 2003. Result : the VS 2003 compiled Dll is slower than the VC6...
8
2457
by: mast2as | last post by:
I am sure this topic has been discussed a thousand times and I read a few things about it today on the net. I also want to say I am trying to start a polemic here, I am just curious and willint to learn and improve the way I am approaching some coding issues that I have at the moment. I use C++ programming for my work, but I am not a developper so please be patient & tolerant in your answers ;-) Okay for the last few days I have been...
6
1757
by: DBMonitor | last post by:
I have a table on a database that contains 18million records. I need to design a system that queries this table to produce fast counts. I have got counts for multiple criteria down to only a few seconds. Most take under a second however I have a few queries that seam to take longer which I am working on reducing the time. I have found some strange behavour in the way SQL Server works. Take the following two queries which produce...
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10139
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9931
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.