Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8281917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:12:00+00:00 2026-06-08T10:12:00+00:00

any advice would be appreciated, I’m still learning in c# so I apologize if

  • 0

any advice would be appreciated, I’m still learning in c# so I apologize if I miss something obvious. I’m using VS2010 and the application uses net 2.0

I’m looking to speed up these two processes as much as possible. The first process is reading in data tables from a server, then storing them as cache files. Each cache file has multiple data tables. The second part is retrieving these data-tables from a cache file and storing them in a dataset.

Originally the process stored the data tables as XML files, and this took forever both with creating the cache files and retrieving them. when running the application. These tables can range anywhere from 10MB to 400MB in size.

I set it up so it built and read the cache files to and from my local machine.

I tried using binary serialization, which helped a good amount. It took the tables down to about 1/6 the XML file size and also sped it up, but I’m looking to see if there is something faster. I have been looking for awhile now and I cannot find anything else. I checked out protobuf-net, which looks like a fantastic way to speed up serializing, but from what I found data tables do not seem work well with it.

Here are some numbers..

Time to build Cache files:
XML-about 2 hours, 
Binary -  about 1 hour

Test Case for reading from Cache file:
XML - 3m 40s, 
Binary - 2m 20s

I know this is a lot of data and can’t expect a whole lot, but is there another way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:12:04+00:00Added an answer on June 8, 2026 at 10:12 am

    The first rule of optimization is to measure where time is being spent. It may be a good guess that the time is in the serialization code, but there’s nothing like a good profiler session to be sure…

    Having said that, the performance gains you see when changing the serialization mechanism do indicate that at least a chunk of time is spent on serialization itself.

    XML Serializer is horribly slow for large files. BinaryFormatter is better, but still not exactly a speed demon.

    Protocol Buffers are around 6x faster and store data much more compact than BinaryFormatter.

    http://theburningmonk.com/2011/08/performance-test-binaryformatter-vs-protobuf-net/

    enter image description here

    Marc Gravell (of Stack Overflow) wrote an implementation of protocol buffers in .NET

    http://code.google.com/p/protobuf-net/

    You can get this using NuGet.

    (Jon Skeet did as well, but I prefer Marc’s implementation).

    There is also

    A library for serializing ADO.NET DataTables and DataReaders into an efficient, portable binary format. Uses Marc Gravell’s Google Protocol Buffers library, protobuf-net.

    https://nuget.org/packages/protobuf-net-data/2.0.5.480

    (Also available through NuGet)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

which library would you advise me to use? I don't know any of these
Any advice how to console.log the element that fired an hover action? This is
Any advice how to access an internal method var of jQuery Masony? I'm looking
Does anyone have any advice or techniques for deploying SSIS packages to the Integration
Does anyone have any advice on which method is better when caching data in
Does anybody have any advice on working in a Date Driven Development environment? Essentially,
can anyone give me any advice on what to do about this error ?!
Does anyone have any advice how to write such app? Or maybe knows some
I was wondering if anyone had any advice on parsing a file with fixed
To start, I am a beginner in drupal, so any advice helps me out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.