Re: [XSL-FO] Time contratins for rendering FO to PDF - (SVG contents)
- vijay chiniwar wrote:
> The pdf document to be displayed consists of lots of charts (Charts...
> being in SVG format), the fo document consists a refrence to this
> charts as shown <fo:external-graphic src="http://localhost:..."/>
> I noticed that my program (listed below) which takes the byte arrayLess than one hour. Barely a huge time.
> of the fo file and renders to pdf takes 7 secs per company and i
> have to generate pdfs for 600 companies, (600*7) is a huge time,
> Please let me know if i have some alternate ways at getting down toThe first step is to determine whether the time is spent in generating
> this problem, if i can reduce the time to 3-4 secs it would be just
> great, i also noticed that without charts the time per company is
> hardly 1 sec
the charts or in rendering them, or somewhere else. Get one of the many
command line download utilities and save all SVGs to files, then change
the image URLs to point to the files and check the rendering times. You
might want to measure the time for generating the SVGs while you are at
it. If the rendering time is much higher than the time for generating
the SVGs, you are almost out of luck. If the generator takes a
significant share, streamline the chart generation or take advantage of
a multiprocessor machine.
There's also the possibility that the communication between the servlets
and/or the SVG XML generation and parsing is important. In this case you
can try to modify the FOP source to accept the SVG as a SAX event
stream, provided that your chart generation program can do this. It's
not that hard (I've done it in less than 20 minutes in the past).