Optimize for jpeg encoding

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Post Reply
Bill Pfeiffer

Optimize for jpeg encoding

Post by Bill Pfeiffer » Sat Sep 16, 2000 4:47 am

I just got my first chart rendering in a servlet with data from my database using JFreeChart. It is awesome and fits my need (XY Time Series chart) quite well.

One problem I have come across, (through no fault of JFreeChart), is that the encoding of the chart to a jpeg takes what will be percieved as an unacceptable time to render (for a web page).

The encoding can take up to 20+ seconds.

Are there any tips or tricks that I can perform against JFreeChart (reduce number of colors used?) to optimize the time to encode the chart to a graphic?

Any help would be appreciated.

Thanks for an excellent library!

Bill Pfeiffer

David Gilbert

RE: Optimize for jpeg encoding

Post by David Gilbert » Wed Sep 27, 2000 8:30 pm

Hi Bill,

JPEG encoding isn't something I know much about. On the links page on my website there is a PNG encoder (open-source) that you could try instead (unless you really need/prefer JPEG) - it seems to encode images pretty quickly, although I haven't tried anything else.



Post Reply