Git Product home page Git Product logo

Comments (5)

RehanSaeed avatar RehanSaeed commented on August 12, 2024

Thanks for the suggestion. I'm aware of JIL, my understanding is that it is blazingly fast but has some limitations (not that I can remember what they were) but that makes sense as JSON.NET has to work for everyone and provide support for everything.

I guess that you are suggesting adding a JIL based media type formatter, is that correct? That's a good idea for an API, maybe not for a website as it wouldn't be used much. It would require a new NuGet package because of the added dependency.

from templates.

RehanSaeed avatar RehanSaeed commented on August 12, 2024

Added to the TODO list.

from templates.

vipero07 avatar vipero07 commented on August 12, 2024

I thought I followed up with a response but apparently not. Yes it would be great to be able to select (during the initialization of the project) the media type formatters a user would like to include.

I think the limitations presented with using JIL is that the initial request is slower than that of JSON.NET.

From the git

The first time Jil is used to serialize a given configuration and type pair, it will spend extra time building the serializer. Subsequent invocations will be much faster, so if a consistently fast runtime is necessary in your code you may want to "prime the pump" with an earlier "throw away" serialization.

Essentially requiring large lists of deserialized or serialized objects to be primed for best effect. As a result it shouldn't be the default because not all devs would know this. I'm not sure if this has implications that the serializer should be a singleton or what though.

from templates.

RehanSaeed avatar RehanSaeed commented on August 12, 2024

Thanks for pointing that out. It seems it's not as simple as just switching out the serializer. We would have to add some kind of warmup phase.

I know that JSON.NET has started to do some work on performance in version 8+. In particular in reusing arrays to reduce object allocations. I would be interested to see what the performance is like after these changes. Perhaps there is a benchmark somewhere.

from templates.

vipero07 avatar vipero07 commented on August 12, 2024

The majority of the benchmarks I've seen do not account for "priming the pump" so the two end up having very similar performances. But it would be interesting to see version 8+ benchmarks compared to JIL when JIL is set up properly.

from templates.

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.