Git Product home page Git Product logo

Comments (8)

taowen avatar taowen commented on May 21, 2024

stream api is considered as "optional". 99% percent of time, byte array input will be the best option.

from java.

ekuleshov avatar ekuleshov commented on May 21, 2024

Guess I am at that 1%. I have to process large json files and it is not possible to load them into the byte arrays held in memory. It should be possible to use streaming and writer API without dynamically linking anything or generating any code at runtime.

from java.

taowen avatar taowen commented on May 21, 2024

The best option is to make a fork of this library. Delete IterImpl.java and rename IterImplForStreaming.java to IterImpl.java. The idea is to support streaming mode without virtual method call. So Javassist is used to shadow the class in runtime.

from java.

ekuleshov avatar ekuleshov commented on May 21, 2024

That is pretty much what I had to do, but it is not maintainable like that. I'd have to stick with Jackson if that would be the only option.

As a thought. Maybe make it other way around. Stream by default and replace virtual call when dynamic codegen is used... or provide JsonIteratorStream hardwired with IterImplForStreaming

from java.

taowen avatar taowen commented on May 21, 2024

how about I maintain the fork for you? like lite version. It is just a bash script to copy the files needed over. What features do you need? Encoding or decoding? Iterator only or more?

from java.

ekuleshov avatar ekuleshov commented on May 21, 2024

Thank you for a generous offer, but that won't be necessary.
I completed evaluation of Jsoniter. Really like simplicity of the stream API. But I didn't get a significant performance increase over jackson 1.x for my project when parsing large json datasets using stream api. Also jackson is more forgiving when parsing various data types. So I will have to keep my existing implementation.

from java.

taowen avatar taowen commented on May 21, 2024

switch case based on string field is slow. that is the biggest bottleneck in all the parsing process.

from java.

ekuleshov avatar ekuleshov commented on May 21, 2024

I still see quite a bit of jsoniter code at the top of the list:

image

from java.

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.