Giter Club home page Giter Club logo

Comments (4)

hcpchris avatar hcpchris commented on May 19, 2024

Hi @rdp1414 ! This is definitely a known performance issue that particularly affects datasets with large numbers of data points. We have on our roadmap fundamentally improving performance, which is an effort that is currently underway.

In this case, the to_js_literal() method is not recursive, but the issue is that it basically has to be executed on every object within the overall chart configuration tree. And this means that it needs to be run on every data point, which gets serialized to its JS literal object representation. So even if that were to only take 1 millisecond per data point, with 4000 data points you're looking at 4 seconds spent just doing that - which obviously is suboptimal. This is why the serialization to JS literal is a major area of optimization that we are looking at.

While it's not ready for release yet, we're likely to introduce two different types of optimization:

Earlier on:

  • we will support serialization of data points to a simple array (i.e. unless a data point has special (non-default) configuration settings applied, there is no need to serialize it to its full JS literal object representation - it can be stored and serialized in a simple array, which is a much simpler / faster process
  • we will be pruning the JS literal serialization logic to make sure that there are no unnecessary round-trips being made

Longer term, we are thinking about implementing JS literal serialization through either a C or Rust extension to get maximal performance. But that's a longer-term effort.

Both of these sets of improvements are works-in-progress, and are unlikely to be released in the next few weeks. You can keep track of progress by watching the roadmap item, however.

from highcharts-core.

abbas-mohd56 avatar abbas-mohd56 commented on May 19, 2024

Just wanted to add that I'm facing a similar performance issue but with to_json method instead. I have a Dataframe with multiple columns and around 9k rows. When I try to create a LineSeries object for each column, the to_json method can take up to 30s to generate the json string.

from highcharts-core.

hcpchris avatar hcpchris commented on May 19, 2024

So good news on this issue: some of the performance improvements we've implemented (and which are slated for release in v.1.4) are benchmarking at accelerating the .to_js_literal() method by 50 - 90%, and accelerating the .to_json() method by about 30 - 90%.

In both cases, the performance improvement should be very significant, but the absolute impact will depend on how complex your chart configurations are and how many data points you have. Either way, the next release in the coming weeks should see some very significant improvements on this front.

from highcharts-core.

hcpchris avatar hcpchris commented on May 19, 2024

So this issue should see a significant improvement now that v.1.4.0 has been released. In our benchmarking tests, the .to_js_literal() method sees a 50 - 90% performance improvement over v.1.3.7, depending on various factors. Given that, I'll close this issue for the time being, but if you still see poor performance, please feel free to either re-open or file a new issue and we'll take a deeper dive to see what may be causing such degraded performance.

from highcharts-core.

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.