Git Product home page Git Product logo

Comments (4)

AqlaSolutions avatar AqlaSolutions commented on June 29, 2024

@ab-tools
You can use surrogates. This is a feature of the original protobuf-net. See http://stackoverflow.com/questions/7046506/can-i-serialize-arbitrary-types-with-protobuf-net

from aqlaserializer.

ab-tools avatar ab-tools commented on June 29, 2024

Again thank you for this very quick reply! :-)

True, this Surrogate approach at least cleans up the code a bit (will change my current work-around in this way). But technically it makes no difference (correct me if I should be wrong):
for each instance (and there are 100,000s of them) of Point, Rectangle, ... used in the data structure an additional (useless) object needs to be created on serialization and deserialization.

But with a direct support of these types this would not be needed.

from aqlaserializer.

AqlaSolutions avatar AqlaSolutions commented on June 29, 2024

@ab-tools
I'm not 100% sure but you can use structs (not classes) as surrogates to not clutter up heap. If it's possible then performance hit should be negligibly small.

from aqlaserializer.

ab-tools avatar ab-tools commented on June 29, 2024

Good idea, works good - also with struct!

Then I will leave it like this and use your solution starting from now (I already removed all the legacy "protobuf" attributes ;-) ). It's definitely a progress compared to protobuf-net!

Thanks again for the great support
Andreas

from aqlaserializer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.