Le 04/06/2015 22:29, Enrico Forestieri a écrit :
On Thu, Jun 04, 2015 at 06:33:28PM +0100, Guillaume M-M wrote:

1) the explosion in size mentioned above. This affects both stable and
master. (This is also responsible for a regression wrt 2.1.3 because of
zooming triggers preview as already discussed.)

Using vim I duplicated your document 26 times, thus creating a document
with a total of 676 different macros (attached). When generating the
previews, a 12Mb file was created, so the issue is real, at least for those
using hundreds of macros in a document, not the vast majority, I bet ;)

The attached patch against stable reduced the size of the tex file to
a perfectly manageable size of about 60Kb.

Richard, I think that this is pretty safe for stable. It simply omits
the macro definition if it is not used in the math inset. At worst,
it is added unnecessarily if for example \beta appears in the inset
and the macro name is \b, \be, or \bet.

As regards master, we have still to solve the other problem mentioned
in this thread before we can proceed.


Good news, I can confirm that it is much quicker, even unnoticeable.

Bad news, it seems to forget that macros can use macros. With the attached file the preview is as follows:

\begin{preview}
\global\long\def\b{\a}

$\b$
\end{preview}

Good news, opening the file lyx-bug-lassert-preview-startup.lyx no longer makes a crash (probably it just hides the bug).

Attachment: lyx-preview-macros.lyx
Description: application/lyx

Reply via email to