Large Ansi Output Cutoff

Submitted by javelin on Sun, 2012-02-12 22:50

Alright.. I don\'t think my question got added right the first time, so here goes. Anyways, I have a function that is outputting a lot of ansified text (a grid of characters), but after a certain number, it just cuts off and stops displaying the characters. I checked the function invocation limit, and that isn\'t the problem. When I remove the ansi(), it outputs fine.. I\'m thinking it may have something to do with the output buffer, but I\'d be unsure in how to change that. Any suggestions?

2001-Apr-05 8:17pm twpage

As you suggest, the cutoff is likely due to limited buffer size and
the way that the MUSH stores ANSI codes. Each ANSI transition takes
up between 4 and 7 bytes in the fixed-size (usually 8K) evaluation
buffer... so if you\'re doing color transitions with every character,
you\'ll only be able to fit around 1000 visible characters into the
buffer. Possibly less if you\'re combining foreground, background,
and highlight in each change (that\'s 3 separate transitions, when
stored).
One way to deal with this would be to generate (and @pemit or whatever)
each line of output separately. It\'s very unlikely you\'ll have so much
ANSI stuff that you won\'t be able to fit 80 visible characters into the
buffer.
Alternatively, if you have hardcode access to the server you\'re doing
this on, you can increase the BUFFER_LEN above 8K. I really don\'t
encourage this, however.
PennMUSH may start dealing more economically with ANSI in future... but
I wouldn\'t wait for it.

2001-Apr-06 4:39pm popiel