In my case I fixed the slowness with this at the end of my environment:
<if|<nf-last-chunklet?|<value|nf-name>>|<assign|<merge|code-line-|<value|nf-name>|-nr>|0>>
nf-last-chunklet? uses some hackery to know if it is the last instance
of the environment (for a particular nf-name) in the document by looking
to see if there is a label defined based on the chunklet counter with 1
added to it.
If it is the last chunklet, then the line counter does not need
preserving, and zero-ing it keeps things quick.
Sam
On 06/04/11 14:11, Sam Liddicott wrote:
I've simplified the whole deal with a new definition of list that does
not reset item-nr to 0:
<assign|list|<macro|item-render|item-transform|body|<with|current-item|<arg|item-render>|transform-item|<arg|item-transform>|<render-list|<arg|body>>>>>
<\enumerate>
<item>one
<item>two
<item>
<item>three
<item>four
</enumerate>
hello joe <value|item-nr>
the enumerate and "hello joe" line can be repeated a few thousand
times to bring the same problem.
I guess it is because the texmacs document is a program. When a change
is made, it has to be re-executed in it's entirety unless it that can
be optimised out.
In some cases for me, though, the counter is never re-used again after
the environment instance in which the new line is being inserted, so
it could be optimised out...
So I need to talk to someone on the nature of these optimisations (if
I am right).
Sam
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev
--
[FSF Associate Member #2325]
<http://www.fsf.org/register_form?referrer=2325>
<http://www.openrightsgroup.org/>
_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev