473,513 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hashtable Memory Dump?

Hello all,

I have written a hashtable class that holds a dyanically allocated array
of structs which holds data about a visualization model. This data is
parsed via xerces from XML into this hashtable. This method works well
for small < 100K files, but I'm looking to handle 3MB files. To speed
things up, I think it would be nice to dump the hashtable to a file so
that I may undump it into memory next time the program is run. I have
no clue how to do this other than writing it out via iostream which
would give me an equivilent of flat XML file and require a ton of
processing. I would like to do something simular to SGI's OpenGL
Performer PFB format. Any thoughts?

Thanks,
-Otto Barnes

Jul 19 '05 #1
1 3149
Otto Barnes <si**@verizon.net> wrote in message
news:bg**********@solaris.cc.vt.edu...
Hello all,

I have written a hashtable class that holds a dyanically allocated array
of structs which holds data about a visualization model. This data is
parsed via xerces from XML into this hashtable. This method works well
for small < 100K files, but I'm looking to handle 3MB files. To speed
things up, I think it would be nice to dump the hashtable to a file so
that I may undump it into memory next time the program is run. I have
no clue how to do this other than writing it out via iostream which
would give me an equivilent of flat XML file and require a ton of
processing. I would like to do something simular to SGI's OpenGL
Performer PFB format. Any thoughts?


If you want to serialize your data, the only facility
available for that in standard C++ is via iostreams.

You can write your data in any format you like (prefer
text if you want the data to be portable among platforms).
I don't see what the problem is. If you want to store the
data as text, create an inserter and an extractor for your
class. If you want to store the data 'raw', use
'std::ofstream::write()', and read it back with
'std::ifstream::read().'

-Mike

Jul 19 '05 #2

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

Similar topics

0
556
by: Brij | last post by:
Hi Guys, kinda hopin someone has an answer to this. I have some user information that i need to dump into a cookie, but its not a straightforward dump. I have a collection of data in a...
7
11101
by: Matthias Kwiedor | last post by:
Hi@all! I have a app (c#) where i load up a external dll (managed code from c#) with a small arraylist and hashtable in two routines (about 40000 objects in each arraylist and hashtable). If...
1
443
by: Derrick | last post by:
I'm seeing what looks like a leak with Hashtable, but guessing it is something I'm doing - void func1() { Hashtable hash = getHash(); //Loop thru assorted data, check to see if data exists...
8
1581
by: JackRazz | last post by:
Is it possible to create a hashtable that doesn't store the key? I have a very large hashtable and I just want it to store the HashCode and the Value (two Int16s). Thanks - JackRazz
3
10141
by: MioTheGreat | last post by:
I know how to take a single hashtable, and then use a binaryformatter and a filestream to dump it to a file, but I need to serialize and deserialize a hashtable inside a class. I've been trying...
9
3240
by: Microsoft News Server | last post by:
Hi, I am currently having a problem with random, intermittent lock ups in my ASP.net application on our production server (99% CPU usage by 3 threads, indefinately). I currently use IIS Debug...
10
8485
by: chrisben | last post by:
Hi, Here is the scenario. I have a list of IDs and there are multiple threads trying to add/remove/read from this list. I can do in C# 1. create Hashtable hList = Hashtable.Synchronized(new...
4
2372
by: Hafiz | last post by:
Hello, do you have any idea which Hashtable takes more memory ...I mean if we declare Hashtable in C# and in Delphi which one take more memorey? any idea ? regards,
9
3094
by: raylopez99 | last post by:
Hello all— I’m trying to get the below to work and cannot get the format right. It’s from this example: http://msdn.microsoft.com/en-us/library/8627sbea(VS.71).aspx What it is: I’m trying...
0
7384
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,...
0
7539
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...
1
7101
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
7525
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
5686
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,...
0
4746
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...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1596
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
456
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...

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.