473,471 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HybridDictionary v.s. XPath Queries for performance?

The app gets about 300 requests per second during peak hours. The part of
the app in question acts like a "lookup table", but isn't tied to a
database. My reading on the subject, and my test code, leads me to believe
using a HybridDictionary object is super fast. Yet I'm told XML parsing is a
contender and should be considered.

In your experience which you would you use, considerations that should be
taken into account and any gotchas you've come across.

Thank you.


Mar 31 '06 #1
3 1691

"Mark S." <ma***@yahoo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
The app gets about 300 requests per second during peak hours. The part of
the app in question acts like a "lookup table", but isn't tied to a
database. My reading on the subject, and my test code, leads me to
believe using a HybridDictionary object is super fast. Yet I'm told XML
parsing is a contender and should be considered.

In your experience which you would you use, considerations that should be
taken into account and any gotchas you've come across.


How complicated is your data? Is it just a single key or is it a deep
lookup? If its just a key-value pair lookup, may as well use the dictionary,
I can't say it'll be faster without testing it, but it'll almost certainly
be simplier, and if your tests are showing HybridDictionary is faster, I
can't see any reason to use XML.

Mar 31 '06 #2
> How complicated is your data? Is it just a single key or is it a deep

Good question, I look forward to hearing your thoughts if the answer changes
your opinion...

If I used a HybridDictionary, here's the approach I'm considering.
Keys:
-- the key would be a string no longer than 50 characters in length
-- today the number of keys would be about 40, but could grow to a couple
hundred over the next year or two.

Values:
This is a little tricky. Depending when, who and a couple other criteria the
returned value will change.
-- another HybridDictionary as the value and using a few switches and ifs,
determine which value of this child dictionary should be returned. There's
an outside chance this child might need it's own child dictionary object.

Does this change your thinking or does a better approach come to mind?

Apr 1 '06 #3

"Mark S." <ma***@yahoo.com> wrote in message
news:u%****************@TK2MSFTNGP14.phx.gbl...
How complicated is your data? Is it just a single key or is it a deep
Good question, I look forward to hearing your thoughts if the answer
changes your opinion...

If I used a HybridDictionary, here's the approach I'm considering.
Keys:
-- the key would be a string no longer than 50 characters in length
-- today the number of keys would be about 40, but could grow to a couple
hundred over the next year or two.

Values:
This is a little tricky. Depending when, who and a couple other criteria
the returned value will change.
-- another HybridDictionary as the value and using a few switches and ifs,
determine which value of this child dictionary should be returned. There's
an outside chance this child might need it's own child dictionary object.

Does this change your thinking or does a better approach come to mind?


If you are going to have dictionaries of dictionaries, its almost certainly
looking into XML if the data is going to be serialized in any way, not sure
its worth doing if you are never going to actually *serialize* to xml.


Apr 1 '06 #4

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

Similar topics

6
by: Scott Simpson | last post by:
What is a good tool for running XPath queries on Linux? I have the O'Reilly XPath book and I'm using XPath Visualizer on Windows and that seems to work fine, but I'm looking for something on Linux....
7
by: Scott W Gifford | last post by:
Hello, I'm considering using XML to represent a stream of location information, and XPath to do queries against it. I've got most of it figured out (at least on paper), but I can't figure out...
2
by: dc | last post by:
i have a xml file like this: <?xml version="1.0" encoding="utf-8"?> <validate xmlns="http://tempuri.org/fieldValidate.xsd"> <field name="Short Name" type="SN" length="10"> <requiredChar...
10
by: Michael C# | last post by:
OK, here's the deal. I have a small XML file that represents a small database table. I load it into a System.XML.XMLDocument. So far so good. I run an XPath query against it to retrieve all the...
0
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...
0
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,...
1
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
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.