Comments (4)
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.
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.
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.
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)
- Simplify .from_csv()
- Add SeriesBase.convert_to() method to convert between series types.
- Add CallbackFunction.from_python() method
- python highcharts integration issue with loading script in Jupyter Notebook HOT 8
- BUG - Custom point attributes are lost in from_dict call HOT 2
- Boxplot rendering in jupyterlab - highcharts-more issue? HOT 8
- `from_pandas` method raises `HighchartsValueError` when a DataFrame column is a datetime object HOT 2
- FEATURE REQUEST: JS Literal Sanitising HOT 2
- Request new feature: Rendering Highchart core in Streamlit HOT 1
- Unable to use chart.marginRight HOT 12
- Add Highcharts Core for Python support for Highcharts v.11.2
- Blank charts after 1.4.0 update when PieSeries is included HOT 7
- Add support for `_repr_html_` to Highcharts Core for Python
- Add support for `_repr_png_`, `_repr_svg_`, `_repr_jpeg_` to Highcharts Core for Python
- Add support for `_ipython_display_` to Highcharts Core for Python HOT 1
- Add GPT 4.5 Turbo support
- BUG : chart.display() rendering in Jupyter Lab but not in Jupyter notebook (in web browser)
- BUG Cannot set chart_options of Exporting class to HighchartsOptions instance
- Update license to support explicit Education and Personal License
- Streamline Custom Series Type Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from highcharts-core.