bad Prfomance on Linux

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
greiff
Posts: 5
Joined: Tue Nov 11, 2003 10:48 am
Location: Germany
Contact:

bad Prfomance on Linux

Post by greiff » Tue Feb 03, 2004 12:25 pm

we have a problem with the performance of JFreeChart on Linux. On Windows 2000 it takes 1 sec to genearate a PNG timeseries chart with 2 series. On our Linux box (same mem and processor) the overall task takes 10 secs.
We are using Jboss as appserver and jdk 1.4.2.
Are there any performance issues on linux ?

thx in advance
Torsten

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 Feb 04, 2004 11:12 am

I have noticed that Java2D is slower for me on Linux than on Windows (same machine), but I don't know the reason why. And sometimes the difference is as much as a factor of 10 (but usually less).

What type of chart are you drawing? In most places, the JFreeChart code tries to be flexible rather than fast, so it is often possible to make chart-specific alterations to the source code to get better performance. Or if you prefer not to modify the code, switching off anti-aliasing improves speed a lot.
David Gilbert
JFreeChart Project Leader

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

greiff
Posts: 5
Joined: Tue Nov 11, 2003 10:48 am
Location: Germany
Contact:

Post by greiff » Thu Feb 05, 2004 1:21 pm

david.gilbert wrote:I have noticed that Java2D is slower for me on Linux than on Windows (same machine), but I don't know the reason why. And sometimes the difference is as much as a factor of 10 (but usually less).

What type of chart are you drawing? In most places, the JFreeChart code tries to be flexible rather than fast, so it is often possible to make chart-specific alterations to the source code to get better performance. Or if you prefer not to modify the code, switching off anti-aliasing improves speed a lot.
Thanks for your reply.
We draw a 2 line timeseries chart (each up to 500 data entries) and a 200 day moving average. How can I switch off anti-aliasing ?

Torsten

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 » Fri Feb 06, 2004 5:43 pm

You can use the setAntiAlias() method in the JFreeChart class. It was deprecated at one point, but I have reinstated it now.

I'm hoping to modify the renderer that draws lines for the time series charts to have an option to store all the small lines that make up a series as a polygon or general path in the renderer state object, then just draw the whole line at the end. I need to do this because when there are a lot of items and the line stroke is dashed, you can't make out the dashes anymore...but I think it may also speed things up a little. It's on the to-do list, anyway.
David Gilbert
JFreeChart Project Leader

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

Locked