Long time drawing chart - urgent

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
serhan
Posts: 10
Joined: Tue Jul 05, 2005 9:03 am

Long time drawing chart - urgent

Post by serhan » Wed Jul 12, 2006 1:03 pm

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

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Jul 12, 2006 2:59 pm

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.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

serhan
Posts: 10
Joined: Tue Jul 05, 2005 9:03 am

ChartEntity mechanism

Post by serhan » Thu Jul 13, 2006 8:35 am

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.

Locked