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 1024965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:51:21+00:00 2026-05-16T11:51:21+00:00

We have been using BinarySerialization with our C# app, but the size and complexity

  • 0

We have been using BinarySerialization with our C# app, but the size and complexity of the classes which need to be serialized results in sloooooow (de)serialization, and large files.

We suspect that we should just write our own custom serializers; but protobuf-net claims significant speed and size advantages over standard .Net binary serialization, and may be easier to add to our app than a large number of bespoke serializers.

Before spending significant time and effort trying to get it to work for us, I would love to know whether there are any deal-breakers. We are using properties defined with interfaces, generic lists of abstract sub-classes, custom bit flag enums, etc etc etc. What would stop protobuf-net working for us?

  • 1 1 Answer
  • 3 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-05-16T11:51:22+00:00Added an answer on May 16, 2026 at 11:51 am

    protobuf-net does what it can to adhere to the core protobuf spec, and then some (for example, it includes inheritance), however:

    • v1 is not very good at interface-based properties (i.e. ICustomer etc); I’m working on getting this improved in v2
    • v1 likes there to be a parameterless constructor (this requirement is lifted in v2)
    • you need to tell it how to map the model to fields; in v1 this needs to be decorated on the type (or there is an option to infer some things from the names etc); in v2 this can be done externally
    • in v1, flags enums are a pain; in v2 there is an option to pass-thru enums as raw integers, making it much more suitable for falgs
    • abstracts and inheritance are fine, but you must be able to determine all the concrete types ahead of time (to map them to integer keys)
    • generics should be fine
    • jagged arrays / nested lists without intermediate types aren’t OK – you can shim this by introducing an intermediate type in the middle
    • not all core types have inbuilt support (the new date/time offset types, for example); in “v2” you can introduce your own shims for this if necessary
    • it is a tree serializer, not a graph serializer; I have some thoughts there, but nothing implemented yet

    If there is some limited example of what you want to serialize, I’ll happily take a look to see if it is likely to work (I’m the author).

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

Sidebar

Related Questions

We have been using MongoDB as our main datastore for a little while but
I have been using play 1.2.5rc4 for development of one app and I have
I have been using echo $.sprintf(%01\$.2f,$numvar); for my USD formatting, but I only copied
I have been using Alaxos CakePHP ACLplugin for my site, which is great. However,
I have been using Automapper in our projects and just recently ran into an
I have been using Javassist to dynamically manipulate classes as they are loaded. While
I have been using NSUserDefaults for passing floats all around my apps. But they
I have been using Javascript but more in a procedural way not the object
I have been using WPF for a new project which is far from done.
I have been using form inheritance for a while now but without doing much

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.