Hi
I'm drwing timeseries chart, using image map, first saveChartAsPNG then writeImageMap...
When I have around 8000 items to draw on the chart it tooks about 15 seconds to saveChartAsPNG and ~5 seconds to writeImageMap!!!
Is this makes any sense, or I have abug somewhere ???
Thanks
Long time drawing chart - urgent
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
It might be that slow (depends a little on your chart, available memory, hardware and JRE)...the ChartEntity mechanism used to translate tooltips and URLs across to ImageMaps doesn't scale that well.
When you create the empty ChartRenderingInfo instance, try calling info.setEntityCollection(null) and see how long it takes to run. Of course, this defeats the purpose of the image map (you might as well have just a PNG), but it will confirm that the time is being taken up in the chart entity code rather than some bug elsewhere.
When you create the empty ChartRenderingInfo instance, try calling info.setEntityCollection(null) and see how long it takes to run. Of course, this defeats the purpose of the image map (you might as well have just a PNG), but it will confirm that the time is being taken up in the chart entity code rather than some bug elsewhere.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


ChartEntity mechanism
Thank you for the effective reply.
First this could be usefull to use info.setEntityCollection(null), since we use this graph in the main page and maybe we don't need tooltips and urls generation, it really makes it faster.
But that not sure, we actually may need this tooltips and url in this specific chart, so maybe I want to try and enhance the ChartEntity mechanism.
First this could be usefull to use info.setEntityCollection(null), since we use this graph in the main page and maybe we don't need tooltips and urls generation, it really makes it faster.
But that not sure, we actually may need this tooltips and url in this specific chart, so maybe I want to try and enhance the ChartEntity mechanism.