I simplified things to use a single global variable and still have the
problem.
The problem seems to be to the storage and recall of the counter.
<with|...|item-nr|<value|pob>|
...
<render-list|<arg|body>>
...
<assign|pob|<value|item-nr>>
>
If I don't save the item-nr in pob, OR if I initialize the item-nr to
a literal number, then updates are fast.
Otherwise, on large documents, entering a new line in the custom list
can be painfully slow (unless I press shift-enter so that <item> is
not created).
Does any master have information on how saving AND recalling a counter
from a global variable could cause this slowness? My guess is some
magic that might be avoided perhaps with some sanitising lambda
Sam
On 04/04/11 08:00, Sam Liddicott wrote:
Texmacs is very slow for my literate programming macros which use
custom lists.
I've pinned the problem down to the assignment of item-nr. Each named
code-chunk can appear in multiple chunklets and has it's own line
counter that is shared across all chunklets, so I assign item-nr to
contain the counter-so-far before I render the list. (BTW I wish html
export also recognized that item-nr may not start at 1):
Assigning item-nr as shown below makes things slow.
<with|...|item-nr|<value|<merge|code-line-|<value|nf-name>|-nr>>|
...
<render-list|<arg|body>>
...
>
Alternatively, if item-nr is assigned to a literal numeric value,
like this:
<with|...|item-nr|29|
...
<render-list|<arg|body>>
...
>
then everything is fast.
I expect I need to do magic with eval and quasi and so on, but no
amount of guessing has worked yet. I think I know that <with...>
encloses all assignments in <quote> so I tried using <assign> instead
with various incantations of quasi and eval but without success.
I need a master to give me a tip on this.... how can I early evaluate
<value|<merge|code-line-|<value|nf-name>|-nr>> to become a numeric
value?
Sam
_______________________________________________
Texmacs-dev mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/texmacs-dev