Hi, sorry for a bit late reply,

Jeremias Maerki wrote:

On 23.09.2006 23:12:06 Tomáa Studva wrote:
Hi developers,

We are using FOP as rendering engine for FO in wysiwyg xml editor
http://sourceforge.net/projects/euromath2. When opening about 40 page fo
document, the editation is ugly slow. We can track changes in source
document(also in case using XSLT), but there is a principal error, because we don't know how to update the FOP produced trees, so new FOP is created to layout document after change and further render by Draw2d (we implemented
some basic renderer composed of Draw2D Figures, which are organized into
tree).
I' ve also profiled our application on such big document, from typing to
update of screen and found out, than FOP consumes 1/3 of processor time,
that is too much if we optimize anything but not FOP- it takes on good PC
about 10 seconds, so FOP 10/3 = 3sec.
So, is there possibility to update the FOP produced trees according to
change in XML (to use it in editor manner, not only rendering engine)?

No, FOP has not been designed to be used as a backend of a WYSIWYG
editor like EuroMath2. That's a new requirement/wish. We'd have to find
out if and how FOP can be changed to fulfill it. At any rate it's an
expansion of the project scope which could be subject to a project
decision depending on how extensive the necessary changes can become.

Yes, I know the design goals of FOP are

   * Conformance to the XSL-FO Specification
   * Process Files of Arbitrary Size
   * Minimize Memory Use

and to use it in WYSIWYG editor is extend of FOP project scope. Co-developer of Euroamth2, has as diploma thesis theme, design of such rendering (layout, painting, ...) engine usable in WYSIWYG editor. The engine should be abstract enough to be usable for any graphical or textual view, and extendable to be usable for concrete document type, like FO. So he will work and maybe he will cooperate with FOP designers to design a good rendering engine.
Or if not, is there possibility to recycle FOP PageSequence which haven't
changed?

Not at the moment, maybe with some hacking. It's not just the
page-sequence that would have to be recycled. You'd have to find ways to
keep the unchanged page-sequences in memory and that includes not only
the FO tree but also the area tree. However, changing a page-sequence in
the middle might invalidate later page-sequences.

And last, is there option to speed up FOP generally, by lowering output
quality or something?

Not by lowering the output quality, no. You can help by profiling and
optimizing FOP and you can make sure the editor only generates the
minimal FO content to produce the right document. Many editor generate
much too much (redundant) content not making use of property inheritance.
That can have an influence on performance.
Yes, I can make a profile of FOP if you don't have any yet, and can send it. I notice, but I think such optimization to produce minimal content would have only a small effect in document, where are plenty of blocks or inlines.
You're welcome to help us improve FOP to better match the requirements
of EuroMath2. I'm pretty sure we currently don't have the resources to
help you much in this direction. We can give you pointers and we can
help you figure out what needs to be changed.
Help will be needed and as I said, but I must consult co-developers what to do and how. More, EM2 is academic project, so there is an opportunity to leave part of java coding as bachelor project.
Please note this is my take on the situation and may not reflect the
opinion of the whole community.

I didn't know of EuroMath2 before your post. If I interpret this
correctly it is a content editor rather than an editor to create XSLT
stylesheets.

Yes, you are right.
I've also taken a peek into your wishlist. I don't think you can
currently find any open source FO implementation that is better suited
for EuroMath2. Concerning the "partial FO rendering possibility": It
might be possible to come up with a way to render, say, only a single
fo:block-container with relatively little effort. This might have the
possibly interesting side-effect that we could write a plug-in for Batik
to render FO content within an SVG. :-)

Interesting, now don't know if it is really needed.
Jeremias Maerki

We(EM2 people) are going to have a meeting, so I am sending emails, to collect as many info about BIG problems as possible. After meeting, more should be clearer. And thanks for answer.

Tomas Studva

Reply via email to