473,732 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Abysmal performance of Scripting.Dicti onary object on 2003 server

I have an application which makes extensive use of the
Scripting.Dicti onary object. I'm not doing anything silly like putting
them outside the page scope -- just creating quite a few of them and
stuffing quite a lot of data (from and MS SQL database) into them.

On Windows 2000 server, everything is fine. If the data structures get
really big it slows down, but for normal operation it's no problem.

Recently our hosting provider moved to Windows Server 2003, and everything
went to the dogs. Pages that used to load in 2-3 seconds can now take in
excess of 30 seconds to load. I've done extensive profiling, and it seems
that the dictionary is to blame. Specifically, putting data into them.
Creating them is fine, getting results from the database is fine, adding
the key/value pairs is a nightmare.

The extreme difference in performance makes me think that the server is
out of memory and thrashing, but the provider insists that there is
plenty of free memory, and that my application is the only one with a
problem. Maybe I'm wrong, and it's a data marshalling issue, not a memory
allocation issue.

The paranoid side of me says that ASP is intentionally "unoptimise d" in
2003 to "encourage" people to move to .NET.

Has anyone else seen this, or have any ideas what causes it?

Rodd

Jul 19 '05 #1
8 5590
Are you adding a lot of key/value pairs? Or adding a lot of data for a few
pairs?

I also use Scripting.Dicti onary in several Classic ASP applications (mostly
for holding a list of potential user errors, and then accessing them when
producing "error summary" for the user), both on Windows 2000 and Windows
2003, and have noticed no perceptable difference. However, I'm not adding
much data (just a short error message), though potentially might add 25-30
key/value pairs.

Cheers
Ken

"Rodd Snook" <us****@nospam. snookums.port5. com> wrote in message
news:pa******** *************** *****@nospam.sn ookums.port5.co m...
: I have an application which makes extensive use of the
: Scripting.Dicti onary object. I'm not doing anything silly like putting
: them outside the page scope -- just creating quite a few of them and
: stuffing quite a lot of data (from and MS SQL database) into them.
:
: On Windows 2000 server, everything is fine. If the data structures get
: really big it slows down, but for normal operation it's no problem.
:
: Recently our hosting provider moved to Windows Server 2003, and everything
: went to the dogs. Pages that used to load in 2-3 seconds can now take in
: excess of 30 seconds to load. I've done extensive profiling, and it seems
: that the dictionary is to blame. Specifically, putting data into them.
: Creating them is fine, getting results from the database is fine, adding
: the key/value pairs is a nightmare.
:
: The extreme difference in performance makes me think that the server is
: out of memory and thrashing, but the provider insists that there is
: plenty of free memory, and that my application is the only one with a
: problem. Maybe I'm wrong, and it's a data marshalling issue, not a memory
: allocation issue.
:
: The paranoid side of me says that ASP is intentionally "unoptimise d" in
: 2003 to "encourage" people to move to .NET.
:
: Has anyone else seen this, or have any ideas what causes it?
:
: Rodd
:
Jul 19 '05 #2
Ken Schaefer wrote:
Are you adding a lot of key/value pairs? Or adding a lot of data for a few
pairs?

I also use Scripting.Dicti onary in several Classic ASP applications (mostly
for holding a list of potential user errors, and then accessing them when
producing "error summary" for the user), both on Windows 2000 and Windows
2003, and have noticed no perceptable difference. However, I'm not adding
much data (just a short error message), though potentially might add 25-30
key/value pairs.

Cheers
Ken

"Rodd Snook" <us****@nospam. snookums.port5. com> wrote in message
news:pa******** *************** *****@nospam.sn ookums.port5.co m...
: I have an application which makes extensive use of the
: Scripting.Dicti onary object. I'm not doing anything silly like putting
: them outside the page scope -- just creating quite a few of them and
: stuffing quite a lot of data (from and MS SQL database) into them.
:
: On Windows 2000 server, everything is fine. If the data structures get
: really big it slows down, but for normal operation it's no problem.
:
: Recently our hosting provider moved to Windows Server 2003, and everything
: went to the dogs. Pages that used to load in 2-3 seconds can now take in
: excess of 30 seconds to load. I've done extensive profiling, and it seems
: that the dictionary is to blame. Specifically, putting data into them.
: Creating them is fine, getting results from the database is fine, adding
: the key/value pairs is a nightmare.
:
: The extreme difference in performance makes me think that the server is
: out of memory and thrashing, but the provider insists that there is
: plenty of free memory, and that my application is the only one with a
: problem. Maybe I'm wrong, and it's a data marshalling issue, not a memory
: allocation issue.
:
: The paranoid side of me says that ASP is intentionally "unoptimise d" in
: 2003 to "encourage" people to move to .NET.
:
: Has anyone else seen this, or have any ideas what causes it?
:
: Rodd

Scripting.Dicti onary object had (has?) some threading issues; Eric
Lippert of Microsoft wrote it while learning about threading:
http://blogs.msdn.com/ericlippert/ar.../19/53054.aspx

There he talks about problems that can occur when using that object.

Possible cures:
There is a component, called "Lookup Table object", written by Microsoft
programmers who wanted better performance than the Dictionary object
provided. Perhaps you could use it.

BTW why use the Scripting.Dicti onary object when you have Session and
Application variables available?

Good Luck,
Michael D. Kersey
Jul 19 '05 #3
"Michael D. Kersey" <md******@hal-pc.org> wrote in message
news:ug******** ******@TK2MSFTN GP10.phx.gbl...
: BTW why use the Scripting.Dicti onary object when you have Session and
: Application variables available?

Because you might run into scoping issues. Session/Application objects are
global, and there is no way to make them "local" (or reduce their scope in
any way).

If I use a Script.Dictiona ry component, then I can limit the scope of that
component (eg to just a routine, or a page). I do not need to worry about
accidently over-writing some value on another page, or in another routine.

Also, I'm wary of adding lots of unnecessary stuff to Session or Application
objects. That makes your app unportable. I have plenty of applications that
I've having issues porting to .NET (or adding new features using .NET)
because of excessive overuse of Session variables, which makes it difficult
to run part of the app using ASP, and part using ASP.NET

Cheers
Ken
"Michael D. Kersey" <md******@hal-pc.org> wrote in message
news:ug******** ******@TK2MSFTN GP10.phx.gbl...
: Ken Schaefer wrote:
: > Are you adding a lot of key/value pairs? Or adding a lot of data for a
few
: > pairs?
: >
: > I also use Scripting.Dicti onary in several Classic ASP applications
(mostly
: > for holding a list of potential user errors, and then accessing them
when
: > producing "error summary" for the user), both on Windows 2000 and
Windows
: > 2003, and have noticed no perceptable difference. However, I'm not
adding
: > much data (just a short error message), though potentially might add
25-30
: > key/value pairs.
: >
: > Cheers
: > Ken
: >
: > "Rodd Snook" <us****@nospam. snookums.port5. com> wrote in message
: > news:pa******** *************** *****@nospam.sn ookums.port5.co m...
: > : I have an application which makes extensive use of the
: > : Scripting.Dicti onary object. I'm not doing anything silly like putting
: > : them outside the page scope -- just creating quite a few of them and
: > : stuffing quite a lot of data (from and MS SQL database) into them.
: > :
: > : On Windows 2000 server, everything is fine. If the data structures get
: > : really big it slows down, but for normal operation it's no problem.
: > :
: > : Recently our hosting provider moved to Windows Server 2003, and
everything
: > : went to the dogs. Pages that used to load in 2-3 seconds can now take
in
: > : excess of 30 seconds to load. I've done extensive profiling, and it
seems
: > : that the dictionary is to blame. Specifically, putting data into them.
: > : Creating them is fine, getting results from the database is fine,
adding
: > : the key/value pairs is a nightmare.
: > :
: > : The extreme difference in performance makes me think that the server
is
: > : out of memory and thrashing, but the provider insists that there is
: > : plenty of free memory, and that my application is the only one with a
: > : problem. Maybe I'm wrong, and it's a data marshalling issue, not a
memory
: > : allocation issue.
: > :
: > : The paranoid side of me says that ASP is intentionally "unoptimise d"
in
: > : 2003 to "encourage" people to move to .NET.
: > :
: > : Has anyone else seen this, or have any ideas what causes it?
: > :
: > : Rodd
: Scripting.Dicti onary object had (has?) some threading issues; Eric
: Lippert of Microsoft wrote it while learning about threading:
: http://blogs.msdn.com/ericlippert/ar.../19/53054.aspx
:
: There he talks about problems that can occur when using that object.
:
: Possible cures:
: There is a component, called "Lookup Table object", written by Microsoft
: programmers who wanted better performance than the Dictionary object
: provided. Perhaps you could use it.
:
: BTW why use the Scripting.Dicti onary object when you have Session and
: Application variables available?
:
: Good Luck,
: Michael D. Kersey
Jul 19 '05 #4
Probably, solution described in

http://support.microsoft.com/default...b;en-us;840875

Nick

"Rodd Snook" <us****@nospam. snookums.port5. com> wrote in message
news:pa******** *************** *****@nospam.sn ookums.port5.co m...
I have an application which makes extensive use of the
Scripting.Dicti onary object. I'm not doing anything silly like putting
them outside the page scope -- just creating quite a few of them and
stuffing quite a lot of data (from and MS SQL database) into them.

On Windows 2000 server, everything is fine. If the data structures get
really big it slows down, but for normal operation it's no problem.

Recently our hosting provider moved to Windows Server 2003, and everything
went to the dogs. Pages that used to load in 2-3 seconds can now take in
excess of 30 seconds to load. I've done extensive profiling, and it seems
that the dictionary is to blame. Specifically, putting data into them.
Creating them is fine, getting results from the database is fine, adding
the key/value pairs is a nightmare.

The extreme difference in performance makes me think that the server is
out of memory and thrashing, but the provider insists that there is
plenty of free memory, and that my application is the only one with a
problem. Maybe I'm wrong, and it's a data marshalling issue, not a memory
allocation issue.

The paranoid side of me says that ASP is intentionally "unoptimise d" in
2003 to "encourage" people to move to .NET.

Has anyone else seen this, or have any ideas what causes it?

Rodd

Jul 19 '05 #5
On Wed, 26 May 2004 11:54:36 +0400, Nikolay wrote:
Probably, solution described in

http://support.microsoft.com/default...b;en-us;840875

Nick


Well, the performance hit isn't writing to the network because all my
responses are buffered, and I've done profiling which points the finger
squarely at the dictionary object. This article about RDS sounds closer
http://support.microsoft.com/default.aspx?kbid=555093
but I'm not using RDS (which goes over HTTP, hence the problem)

However, it sounds like 2003 server has some serious issues. I'm going to
move the application to another hosting provider who can supply win2k
boxes.

Rodd
Jul 19 '05 #6
On Tue, 25 May 2004 09:13:33 -0500, Michael D. Kersey wrote:
Ken Schaefer wrote:
Are you adding a lot of key/value pairs? Or adding a lot of data for a few
pairs?

I also use Scripting.Dicti onary in several Classic ASP applications (mostly
for holding a list of potential user errors, and then accessing them when
producing "error summary" for the user), both on Windows 2000 and Windows
2003, and have noticed no perceptable difference. However, I'm not adding
much data (just a short error message), though potentially might add 25-30
key/value pairs.

Cheers
Ken

"Rodd Snook" <us****@nospam. snookums.port5. com> wrote in message
news:pa******** *************** *****@nospam.sn ookums.port5.co m...
: I have an application which makes extensive use of the
: Scripting.Dicti onary object. I'm not doing anything silly like putting
: them outside the page scope -- just creating quite a few of them and
: stuffing quite a lot of data (from and MS SQL database) into them.
:
: On Windows 2000 server, everything is fine. If the data structures get
: really big it slows down, but for normal operation it's no problem.
:
: Recently our hosting provider moved to Windows Server 2003, and everything
: went to the dogs. Pages that used to load in 2-3 seconds can now take in
: excess of 30 seconds to load. I've done extensive profiling, and it seems
: that the dictionary is to blame. Specifically, putting data into them.
: Creating them is fine, getting results from the database is fine, adding
: the key/value pairs is a nightmare.
:
: The extreme difference in performance makes me think that the server is
: out of memory and thrashing, but the provider insists that there is
: plenty of free memory, and that my application is the only one with a
: problem. Maybe I'm wrong, and it's a data marshalling issue, not a memory
: allocation issue.
:
: The paranoid side of me says that ASP is intentionally "unoptimise d" in
: 2003 to "encourage" people to move to .NET.
:
: Has anyone else seen this, or have any ideas what causes it?
:
: Rodd Scripting.Dicti onary object had (has?) some threading issues; Eric
Lippert of Microsoft wrote it while learning about threading:
http://blogs.msdn.com/ericlippert/ar.../19/53054.aspx

There he talks about problems that can occur when using that object.

Possible cures:
There is a component, called "Lookup Table object", written by Microsoft
programmers who wanted better performance than the Dictionary object
provided. Perhaps you could use it.


I was aware of the threading issues, and would like to move away from
dictionary objects so that I can more easily cache my data in session and
application scope. However, I have a lot of code that would need to be
rewritten, and no time to do it. Also, the current hosting environment
doesn't allow for the installation on 3rd-party components in most
situations. The code is also part of a product which is used outside of my
controlled hosting environment, and hence needs to be as portable as
possible.

BTW why use the Scripting.Dicti onary object when you have Session and
Application variables available?


What Ken said. Plus, I have a good many of them organised in hierarchies
-- i.e. the values in some of the dictionary objects are other dictionary
objects. To answer his original question, I probably have two objects with
about 50 key/value pairs, but the values of each of these are themselves
dictionary objects with about 5-10 key/value pairs. Before you say "Lord!
That's an obscene amount.", I know it, and a lot of it could be cached at
the application level (in some other kind of data structure, or maybe even
as HTML), but the point is that the code performed acceptably on Win2k.

At the moment my preferred solution (apart from moving to another hosting
provider who has Win2k) is to rewrite the whole thing in .NET, or maybe
ASP/JScript or PHP (there, I said it!). Something with native support for
sparse, associative arrays and regular expressions.

Rodd

Jul 19 '05 #7
Rodd Snook wrote:
On Tue, 25 May 2004 09:13:33 -0500, Michael D. Kersey wrote: <snipped>
BTW why use the Scripting.Dicti onary object when you have Session and
Application variables available?


What Ken said. Plus, I have a good many of them organised in hierarchies
-- i.e. the values in some of the dictionary objects are other dictionary
objects. To answer his original question, I probably have two objects with
about 50 key/value pairs, but the values of each of these are themselves
dictionary objects with about 5-10 key/value pairs. Before you say "Lord!
That's an obscene amount.", I know it, and a lot of it could be cached at
the application level (in some other kind of data structure, or maybe even
as HTML), but the point is that the code performed acceptably on Win2k.

So a total of ~500-1000 items: not many, although we know nothing of
their content and, if they're built up and then discarded with each
page, that's a lot of overhead.

Are these dictionary objects running at low, medium(pooled) or high
(Isolated) protection level or running remotely?

Are they saved in the Session or Application objects or to files or a
database between page executions, or are they created and rebuilt with
each page execution?
At the moment my preferred solution (apart from moving to another hosting
provider who has Win2k) is to rewrite the whole thing in .NET, or maybe
ASP/JScript or PHP (there, I said it!). Something with native support for
sparse, associative arrays and regular expressions.

That would be Perl ( http://www.ActiveState.com/ ).
Jul 19 '05 #8
On Fri, 28 May 2004 00:20:47 -0500, Michael D. Kersey wrote:
Rodd Snook wrote:
On Tue, 25 May 2004 09:13:33 -0500, Michael D. Kersey wrote: <snipped>
BTW why use the Scripting.Dicti onary object when you have Session and
Applicatio n variables available?


What Ken said. Plus, I have a good many of them organised in hierarchies
-- i.e. the values in some of the dictionary objects are other dictionary
objects. To answer his original question, I probably have two objects with
about 50 key/value pairs, but the values of each of these are themselves
dictionary objects with about 5-10 key/value pairs. Before you say "Lord!
That's an obscene amount.", I know it, and a lot of it could be cached at
the application level (in some other kind of data structure, or maybe even
as HTML), but the point is that the code performed acceptably on Win2k.

So a total of ~500-1000 items: not many, although we know nothing of
their content and, if they're built up and then discarded with each
page, that's a lot of overhead.

Are these dictionary objects running at low, medium(pooled) or high
(Isolated) protection level or running remotely?


That's a good question, but I'm not sure of the answer. The environment
that's giving problems is a shared server at a hosting provider, so I
can't check on the configuration. I'm also not familiar with the
configuration of Win2k3 and IIS6. Apparently each customer "slot" has it's
own application pool, so I'm guessing that the ASP application is
isolated. The Dictionary object is in-process by default in NT4 and Win2k,
and I would imagine that is also the case on Win2k3, but I may be wrong.

Are they saved in the Session or Application objects or to files or a
database between page executions, or are they created and rebuilt with
each page execution?


They are rebuilt from the database with each page execution. I agree that
this is a lot of overhead, but the application performs acceptably on
Win2k. I would cache them at the application level if it weren't for the
threading limitation of the object.

At the moment my preferred solution (apart from moving to another hosting
provider who has Win2k) is to rewrite the whole thing in .NET, or maybe
ASP/JScript or PHP (there, I said it!). Something with native support for
sparse, associative arrays and regular expressions.

That would be Perl ( http://www.ActiveState.com/ ).


PHP and JScript have these features too, but are semantically closer to
VBScript and thus the porting would be easier.
Jul 19 '05 #9

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

Similar topics

9
9991
by: What-a-Tool | last post by:
Dim MyMsg Set MyMsg = server.createObject("Scripting.Dictionary") MyMsg.Add "KeyVal1", "My Message1" MyMsg.Add "KeyVal2", "My Message2" MyMsg.Add "KeyVal3", "My Message3" for i = 1 To MyMsg.Count Response.Write(MyMsg.Item(i)) next
2
3426
by: Tim Chmielewski | last post by:
I have been trying to read values from a form into an array on a page without much success and was told to use a Scripting.Dictionary instead. There are a variable number of fields on the form as it is different according to which product is ordered (as are the fields that are used to create the record.) This is my first attempt: set OrderInfo = Server.CreateObject("scripting.dictionary") set OrderInfo("prodid") =...
2
2228
by: Vaibhav | last post by:
dear all, i wonder if someone help me.. i am trying the create a dictionary obejct in asp but its giving the error Error Type: (0x8002801D) Library not registered
17
4203
by: Karl Irvin | last post by:
To use the Textstream object, I had to set a Reference to the Microsoft Scripting Runtime. This works good with A2000 Is the Scripting Runtime included with A2002 and A2003 so the Reference won't be broken when my app is opened with those versions. Also is the Scripting Runtime included as part of the A2000 Runtime Engine which some of my customers use.
1
3178
by: Adnan | last post by:
Hi, I am porting an existing ASP applcation to ASP.NET which heavily depends on Mainpulation through Scripting.Dictionary. Can anyone help me out with an alternative to use of Scripting.Dictionary. Secondly, most of the migration done through VS.NET wizard has placed the existing ASP code in <Script> tags in an aspx place. Does the runtime take <script language="VB" runat="Server"> tag as a .NET code and compile it or leaves it for...
8
3756
by: Howard Kaikow | last post by:
Historically, auntie virus software has issued false positives against code using the Scripting Runtime. Does .NET have a native replacement for the Scripting runtime? For example, is there the equivalent of a "CompareMethod" for the Collection object as for the Dictionary object?
6
11527
by: Oenone | last post by:
Could someone suggest a good native .Net collection object that provides similar functionality to the COM Scripting.Dictionary object? Specifically I need to be able to add items with an associated key, retrieve them by key or by index within the collection, and determine whether an item exists in the collection by querying with its key. The HashTable was looking good as it does virtually all of these things, but it doesn't seem to be...
19
3154
by: Tom Jastrzebski | last post by:
Hello, I was just testing VB.Net on Framework.Net 2.0 performance when I run into the this problem. This trivial code attached below executed hundreds, if not thousand times faster in VB 6.0 than in .Net environment, under VS 2005 Beta 2. Does anyone have any idea whether this will be addressed in the final release? Thanks, Tomasz
3
7551
by: jaffar.kazi | last post by:
Hi All, I have a VB COM component that has an object of type Scripting.Dictionary. Each element of this again has Scripting.Dictionary type members. I need to access this in C#, and am not able to do so. Could anyone provide me with source code for the same? Thanks in Advance. Regards, --Jaffar
0
8946
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
8774
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9447
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
9307
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
9235
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,...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
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
4550
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...
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.