Well, is there any open-source replacement of the PNGEncoder
from keypoint ? I think this encoder works very slow.
BAD Performance -> PNG Encoder
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
Re: BAD Performance -> PNG Encoder
You really need to justify statements like that. How slow? What size of chart? etc. I've done some benchmarking with a 500x300 stacked area chart with 3 series and 15 points per series producing a PNG file of around 15KB. On a 1.6GHz P4 the time to encode the PNG file is consistently around 0.2 seconds. Replacing the Keypoint encoder with the Sun PNG encoder in JDK 1.4+ reduces the encoding time by between 5 and 10% on average. But when the original encoding time is 0.2 seconds, it really is not that significant.Sourcemaker wrote:I think this encoder works very slow.
Total chart creation time including writing the image to disk is average just over 0.4 seconds. The majority of the time is spent creating the BufferedImage (~0.2 seconds) and encoding the PNG file (~0.2 seconds). The time spent creating the dataset, creating the JFreeChart object and writing the image to disk were all neglible.
Regards,
Richard...
Hello,
I had some issues concerning chart printing, and worked some time ago on a solution to improve chart resolution (cf topic). The trouble was that, of course , it tooks more time to render an image with the same size but 300 dpi instead of screen resolution. However, as my application was not displaying many charts at the same time, usability was OK.
I recently changed from Swing to HTML, and building a multi-page report in a single jsp file. I used the High Resolution rendering features mentioned above and rendering of my report tooks more than 4 minutes.... I made some output debugging to understand the most time consuming function, and it was the PNG Encoding function, taking more than 70-80% of the time. I then decided to have a go whith the SUN Java Advanced Imaging API encoders and found that things were going faster by a factor 4 or 5 !!
I still need some reworking to make things clean ; if I'll have some more time, I'll give You some facts...
Regards,
Arnaud
I had some issues concerning chart printing, and worked some time ago on a solution to improve chart resolution (cf topic). The trouble was that, of course , it tooks more time to render an image with the same size but 300 dpi instead of screen resolution. However, as my application was not displaying many charts at the same time, usability was OK.
I recently changed from Swing to HTML, and building a multi-page report in a single jsp file. I used the High Resolution rendering features mentioned above and rendering of my report tooks more than 4 minutes.... I made some output debugging to understand the most time consuming function, and it was the PNG Encoding function, taking more than 70-80% of the time. I then decided to have a go whith the SUN Java Advanced Imaging API encoders and found that things were going faster by a factor 4 or 5 !!
I still need some reworking to make things clean ; if I'll have some more time, I'll give You some facts...
Regards,
Arnaud