[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] How texmacs is so slow for my macro
From: |
Sam Liddicott |
Subject: |
Re: [Texmacs-dev] How texmacs is so slow for my macro |
Date: |
Wed, 06 Apr 2011 15:50:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17pre) Gecko/20110404 Lanikai/3.1.10pre |
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
address@hidden
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] How texmacs is so slow for my macro, Sam Liddicott, 2011/04/04
- Re: [Texmacs-dev] How texmacs is so slow for my macro, Sam Liddicott, 2011/04/04
- Re: [Texmacs-dev] How texmacs is so slow for my macro, Sam Liddicott, 2011/04/04
- Re: [Texmacs-dev] How texmacs is so slow for my macro, Sam Liddicott, 2011/04/06
- Re: [Texmacs-dev] How texmacs is so slow for my macro, Sam Liddicott, 2011/04/06
- Re: [Texmacs-dev] How texmacs is so slow for my macro,
Sam Liddicott <=
- Re: [Texmacs-dev] How texmacs is so slow for my macro, Sam Liddicott, 2011/04/07
- Re: [Texmacs-dev] How texmacs is so slow for my macro, Gubinelli Massimiliano, 2011/04/07
- Re: [Texmacs-dev] How texmacs is so slow for my macro, Sam Liddicott, 2011/04/09