Glen Mazza wrote:
Should FOP itself multithread, or would it be better to let whatever would call FOP do the multithreading?

I don't understand this. Even if the main processing methods of the FO processing object are synchronizend, which is probaly what you understand by "FOP isn't MT safe itself", the user can create multiple processors and use them concurrently. Mutable static data, like a static logger reference, interferes severely with using FOP in an MT environment, because this means "one thread rendering globally" rather than "one thread per FO processor rendering, perhaps using multiple processors, each one in a separate thread." That's going to raise complaints, check the posts complaining about the global options in the maintenance branch.

I'd say we may use static data only in a few cases:
- Immutable data, like name mappings and fallback options
- Global font and perhaps image caches
- Object pools (although they are said to decrease performance
 for modern JREs)

J.Pietschmann

Reply via email to