You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by re...@css.ch on 2003/02/03 13:08:10 UTC

Antwort: Re: multithreading issues - FOP, TIFFRenderer, Solaris 4-proc machine, pja x-server


ok, I run the same thing with PDFRenderer, and I found no problems there.
This means that the multithreading issue is either within

a) AWTRenderer
b) TIFFRenderer (subclass of AWTRenderer)
c) pja X-Server emulation.

Since the issue is, that fontsize-changes from one Renderer influence
another Renderer, I suspect the mistake to be in a) or c). AFAIK FOP paints
the characters to the InMemory-Image in these classes. Is this correct?

Has anyone used AWTRenderer in a mutlithreaded environment? Are there any
known limitations?

thanks,
Reto





Oleg Tkachenko <ol...@multiconn.com> on 31.01.2003 16:05:31

            Bitte antworten an fop-user@xml.apache.org

An:      fop-user@xml.apache.org
Kopie:

Thema:   Re: multithreading issues - FOP, TIFFRenderer, Solaris 4-proc
         machine, pja x-server

reto.blunschi@css.ch wrote:

> I am using FOP 0.20.5rc to produce TIFF files from XML in an EJB
> environment. I experience  strange multithreading issues when I run the
> thing in the (production-near) test-environement on a 4-proc box - the
font
> sizes get messed up completly on the 4 proc machine but only if I render
> more than 1 TIFF in parallel.
> If I run only one rendering at a time, it is fine.
> If I run the same thing multithreaded on my dev box, it runs fine (though
> there is only one proc of course)
>
> It is entierly possible that the TIFFRenderer (from Oleg, based on
> AWTRenderer and JAI), or the pja toolkit (http://www.eteks.com/pja/en/)
is
> the problem.

Yes, you have to isolate problem somehow. Can you test it without
TIFFRenderer, using just regular PDFRenderer?

--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org









---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Antwort: Re: multithreading issues - FOP, TIFFRenderer, Solaris 4-proc machine, pja x-server

Posted by "J.Pietschmann" <j3...@yahoo.de>.
reto.blunschi@css.ch wrote:
> 
> ok, I run the same thing with PDFRenderer, and I found no problems there.
> This means that the multithreading issue is either within
> 
> a) AWTRenderer
> b) TIFFRenderer (subclass of AWTRenderer)
> c) pja X-Server emulation.
> 
> Since the issue is, that fontsize-changes from one Renderer influence
> another Renderer, I suspect the mistake to be in a) or c). AFAIK FOP paints
> the characters to the InMemory-Image in these classes. Is this correct?

Probably not. Renderers in general are not MT safe, but I found
critical stuff only in the PDF renderer (static variables holding
a StringBuffer which is filled an reset in an unsync'd routine
in pdf/PDFCIDSystemInfo.java:21 and PDFWArray.java:99).
There are more unprotected static variables but they seem mostly
be changed by configuration, so if you load your configuration
file only once, it shouldn't be that bad.

> Has anyone used AWTRenderer in a mutlithreaded environment?
Well, the AWT renderer bears the comment attributed to Mark
Lillywhite:
  "... This class could also do with a general audit,
   and I suspect it's not swing-thread-safe either."
However, the class was designed for use in a stand-alone viewer,
not for general purpose and multi-threaded environments. I still
didn't find much unprotected static data, however, you might want
to inspect the sourtce yourself.

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: Antwort: Re: multithreading issues - FOP, TIFFRenderer, Solaris 4-proc machine, pja x-server

Posted by Oleg Tkachenko <ol...@multiconn.com>.
reto.blunschi@css.ch wrote:

> ok, I run the same thing with PDFRenderer, and I found no problems there.
> This means that the multithreading issue is either within
> 
> a) AWTRenderer
> b) TIFFRenderer (subclass of AWTRenderer)
> c) pja X-Server emulation.
> 
> Since the issue is, that fontsize-changes from one Renderer influence
> another Renderer, I suspect the mistake to be in a) or c). AFAIK FOP paints
> the characters to the InMemory-Image in these classes. Is this correct?
Probably yes. TIFFRenderer is just a wrapper around AWTRenderer so I 
don't think it can cause the problem. So I bet it's AWTRenderer. File it 
to bugzilla and lets consider if we can do something about it.

-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org