Hi APMatthews,
apm <[email protected]> wrote on 12/25/2008 08:32:12 PM:
> > Would it be possible to share the benchmarking results to the list
> > afterward so this particular change could possibly be committed to the
> > trunk?
>
> I compared the code converting around 65 SVG files in the 4kb-500kb
> size range to PNGs. It took ~20.3 seconds using the Dec 7th build.
> With the patch it took ~28.5 seconds.
So roughly a 40% increase. The effective increase would probably
be greater for Dynamic content as it doesn't have the parsing and basic
tree construction overhead.
> > I'm don't know if doing some memory measurements would also be a good
> > idea, for comparing the difference and watch for a possible regression
> > in terms of memory usage... ;-)
>
> This was the surprise (for me) with the patch, when I put in an SVG
> greater than 500kb it would fail with an out of memory error. I can
> do +900kb SVGs without the patch though it does take its time.
So Helter's suggestion of Xmx will probably help/solve the problem
(the normal default memory partition is tiny ~64MB). Also you could
probably mostly eliminate the extra memory overhead by constructing
a GeneralPath from the Area Object:
new GeneralPath(new Area(shape));
> I wager that's probably more or less what Thomas expected. Doesn't
> quite solve my problem since I do have some large SVG files, but I do
> at least have a better idea of what sort of compromises I may have to
> make.
I think Xmx and/or the above addition will get you going again...