Performance Issues w/ 0.9.4

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Miles Parker

Performance Issues w/ 0.9.4

Post by Miles Parker » Mon Nov 25, 2002 11:58 pm

Hi David,

We recently upgraded from 0.7.4 to 0.9.4 and have noticed a signifcant perfronace drop between the two versions -- very roughly (no scientific measurment) more than 100% slower!

These are all XY plots, typically with many datapoints (but the perf. drop happen regardless of number of datapoints) and that are refreshed every time a new data point is added -- IOTW, very intensive uasge. Just wondering if you have any ideas about this; we're considering downgrading for the short term.

It was much worse, btw, until we got rid of a piece of code in the old version that is apparnlty no longer neccessary in the new version:

chart.plotChanged(plotEvent);

Thanks as always for excellent opensource software.

btw, we should be having a public release of the JFreeChart using version of Ascape very soon -- its not pure open source but it will be free for many users.

Miles

Klaus Rheinwald

Re: Performance Issues w/ 0.9.4

Post by Klaus Rheinwald » Tue Nov 26, 2002 7:37 pm

See thread 'Delaying Chart Redraw'

K.

Miles Parker

Re: Performance Issues w/ 0.9.4

Post by Miles Parker » Wed Nov 27, 2002 2:47 am

Thansk Klaus. I'm not _sure_ this would help in my case, as I am only adding one data point at a time and this always needs to be displayed at least once. IOTW, I think I want the auto update feature. Or is there something more going on here; i.e. the chart may be updating itself even when there are no other triggers?

Dave Gilbert

Re: Performance Issues w/ 0.9.4

Post by Dave Gilbert » Wed Nov 27, 2002 1:15 pm

Hi Miles,

I'd expect some performance reduction in the later versions as extra features have been added, but it shouldn't be as bad as 100%. I guess there is a possibility that somewhere there is a duplicate event notification being generated, so that the chart is getting drawn twice. When I get a chance I'll try to test it and see.

I will be doing some performance testing once I have completed a couple of further feature enhancements. My goal is to ensure that JFreeChart is efficient (i.e. not wasting CPU cycles or creating work for the garbage collector *unnecessarily*) before 1.0.0 is released.

Regards,

DG

Irv Thomae

Re: Performance Issues w/ 0.9.4

Post by Irv Thomae » Wed Nov 27, 2002 4:52 pm

Hello David and Miles,
Although the context of this thread is (x,y) data rather than time-series data, you may want to look at the code I've just posted under the title "Improving Performance for Time-Series Plots". In a nutshell, the "FastTimeSeriesCollection" class represents its data with simple arrays of numbers (all having the same index), instead of using ArrayList's to store objects which represent (x,y) or (t,y) points. I have not run any performance comparisons on the limiting case in which a FastTimeSeriesCollection contains just a single TimeSeries, but the six-fold increase in speed with 3 TimeSeries does at least suggest that even the single-series case may show significant benefit.

Ultimately any TimeSeriesCollection implements the IntervalXYDataset interface, so my results may be extensible to Miles's context too.

Irv Thomae
ISTS/Dartmouth College
Hanover, NH (USA)

Miles Parker

Re: Performance Issues w/ 0.9.4

Post by Miles Parker » Wed Nov 27, 2002 8:34 pm

Cool; I'll take a look. It may be that the overhead associated with converting my arraylist data will make it not worth it, but I bet I can get some ideas from it.

Miles Parker

Re: Performance Issues w/ 0.9.4

Post by Miles Parker » Wed Nov 27, 2002 8:36 pm

Thx David..I realize that a blanket statement like "its slower" isn't terribly helpful. I'm going to paly around with some notification stuff as well. I suspect taht there is some kind of deeper multiple notification thing going on and that might be wrapped up with what my code is doign as well.

Locked