I am trying to boost the performance of the startup of my realtime application. I have the interfaces laided out in a xml file that are parsed in and created into a data structure. Would it be worth while for me to struture my program so that once the interface data structure is created that I serialize the data structure and store it in a binary format on the disk so that when the program starts up again it will read in the already created data structure instead of determining what is what.

There are pros and cons to that.
Pros: the program will be a lot faster at startup

con: the file can't be easily changed. If you need to change something (i.e. add or delete info) then you might have to write a small conversion program that converts the data from from old format to new.

con: the file can't be easily changed. If you need to change something (i.e. add or delete info) then you might have to write a small conversion program that converts the data from from old format to new.

I thought about this and my solution is to compare the dates when they were created and if the config file is newer than the serialized file delete the serial file, parse in the config file and then serialize the data out to disk.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.