IIS - DLHOST.EXE 100% utilisation?

J

Jo Becaus

Hi,

I have ASP site running, which has several include files.

This is include file, most used in the HTML files.

<%
Public objDict
Dim ObjFSO, objFolder
Const Folder = "C:\WWW\MRTG\Configuration\Devices\"
Set ObjDict = CreateObject("Scripting.Dictionary")
Set ObjFSO = CreateObject("Scripting.FileSystemObject")
Call ShowSubFolders (objFSO.GetFolder(Folder))
Function ShowSubFolders(Folder)
Count = 0
For Each Subfolder in Folder.SubFolders
MyFoldArray = Split(Subfolder.path,"\",-1,1)
Count = Count + 1
objDict.Add Count, MyFoldArray(5)
Next
Set objFSO = Nothing
'Set objDict = Nothing
Set FolderFile = Nothing
End Function
%>

Within the ASP file I use the objDict as reference for my needed values,
as the code above is used several times can it cause the DLLHOST.EXE to
stall?
TaskMgr shows 100% CPU usage, I know it is caching all VBscript
request/actions....

Can I prevent it or otherway to get my values past to my webpages
without using a database?
 
A

ASP.Confused

How many folders/files do you have in the
"C:\WWW\MRTG\Configuration\Devices\" folder? If it's above 1000 or 2000,
it will take a while. I ended up having to move to a database to make
things quicker (since Windows looses it's mind when it trys to handle more
than 1000 files ;) j/k.)

Try adding a "response.write Subfolder.path" in your For loop, and a
"response.buffer=false" to the top of your code. this will help you with
debugging.
 
J

Jo Becaus

I tried running the include file straight ahead with Response write and
I get the values.

Once I put it in HTML as include file it hangs?

I did same thing with my first page and works fine with the include
file.

From that page I open new page which runs same include code that past
data to objDict then it hangs?

In the first page on the end it has <%Set ObjDict = Nothing%>

This should clear the dictionary.

Is it just the fact I am using the include file twice?
 
A

ASP.Confused

If you're including the file twice, then you will have duplicate function
definitions within your code, which is probably what is happening to you.
Plus, since the FileSystemObject is natively slow, your code will go
increasingly slower for every time that it is included.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,416
Latest member
LionelQ387

Latest Threads

Top