Hashtable

M

Mike Barakat

Hello,

I'm using hashtables in c# as my primary application database, when the
application loads its deserialize the contents of a file (that has been
serialized) into the computer memory.

The above method is very good when it comes to speed and performance as
i have data retrieval is time intensive, however I'm trying to find
ways to optimize the size of the hashtable as it grows every day, and
I'm limited to the size of the actual RAM on the machine.

I tried to change the hashtable's loadfactor, but that changed
automatically to .72 despite changing it to 1.0 to make use of all the
unused buckets in the hashtable.

I'm using the following to create the hathtable:

Hashtable StatisticsHT = new Hashtable(100, 0.99F);

Can you help me with what I'm doing wrong? or if you have any general
advice on how to optimize the hathtable size?

Regards,

Mike
 
G

Guest

Mike,
If your application is getting to the point where available memory for a
Hashtable is now a consideration, then it's probably time to start thinking
about using a database.
Peter
 

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

Top