Git Product home page Git Product logo

Comments (5)

ltalirz avatar ltalirz commented on June 23, 2024 1

Thanks - I'm now at 13s (0.01ms/pair), memory issues seem gone.

Looking great!

from ijson.

rtobar avatar rtobar commented on June 23, 2024

@ltalirz could you check this one? As expected I'm getting about ~4x improvement on kvitems times for the C backend compared to the previous method, and (also as expected) kvitems seems to be slightly faster than items.

I also sped up a bit the python implementation of kvitems, which now seems to be ~10, 20% faster depending on the use case, as far as I could measure.

from ijson.

ltalirz avatar ltalirz commented on June 23, 2024

Hi @rtobar - thanks a lot for your efforts!

A few observations:

  • Parsing the first 1M items of my JSON now takes ~16s (0.02ms/pair). That is within a factor of 2 of my revised timings for json.load, which is great.
  • It seems like the C implementation leaks memory (it grows up to 2GB in my test)
  • I checked that the pure python implementation uses ~13MB of memory throughout, i.e. the problem seems to be in the C extension

from ijson.

rtobar avatar rtobar commented on June 23, 2024

@ltalirz oops, bad reference counting there... I just pushed some further fixes to the kvitems branch (which also boosts performance by yet another tiny bit, at least in my local benchmarks), please give it another nudge when possible.

from ijson.

rtobar avatar rtobar commented on June 23, 2024

Code merged to the master branch, closing issue now.

from ijson.

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.