I\'m working on a compact framework application and need to boost performance. The app currently works offline by serializing objects to XML and storing them in a database.
Is the performance hit in serializing the objects, or writing them to the database? Since writing them is likely hitting some kind of slow storage, I'd imagine it to be a much bigger perf hit than the serialization step.
Keep in mind that the perf measurements posted by Marc Gravell are testing the performance over 1,000,000 iterations.
What kind of database are you storing them in? Are the objects serialized in memory or straight to storage? How are they being sent to the db? How big are the objects? When one is updated, do you send all of the objects to the database, or just the one that has changed? Are you caching anything in memory at all, or re-reading from storage each time?