On 05/10/2011 11:15 AM, Guenter Milde wrote:
On 2011-05-09, Richard Heck wrote:

Discussion in the "Math Macros in Child Documents" thread has revealed a
problem with how we clone buffers with parents. The set up is this: You
have a master that defines a macro, and a child that uses it. If you try
to compile just the child, it works in 1.6 but not in 2.0. The reason is
that, when we clone the child, we do not clone its parent, so it thinks
it has no parent, so the parent macros do not get exported.
It would seem we must always clone the entire set of documents. I.e.,
start with:
     buf.masterBuffer()->clone();
or something to that effect. But then we need back a pointer to buf's
clone, so clone() probably needs to return something like a map from
Buffers to their clones. Note that, if we pass this around, we can
perhaps avoid multiple clones of a single Buffer included multiple
times, which I suspect we now have.
Sounds complicated.

As, generally, the LyX ->  first-non-native-format (latex, html, text)
export is fast

Export to latex is not fast. It seems to be fast on Linux because the process is forked.

  (compared to the following steps and to image
conversions), could we consider not to clone the buffer but do the
initial export before starting a new thread?

See above. There is no point in using threads if we have to freeze the GUI even a few seconds. But if we manage to speed up latex export under 1 second for say, the user guide, this could be an option.

Abdel.




Reply via email to