Page 1 of 1

Output buffer limitation

Posted: Fri May 02, 2014 9:17 am
by Double Reddog
I've been running into a limitation of the Output screen. There seems to be a limitation to the number of lines which can be displayed from a script. The following script will demonstrate the issue:

For i = 1 To 99999
WScript.Echo i & vbTab & "Display a line of text on the screen"
Next

When I run the script from a CMD prompt, it finishes without issue. When I run it from within primalscript, it "hangs" at the entry when the variable "I" is equal to 1765. Is there a limitation to the number of lines of output within primalscript?

Re: Output buffer limitation

Posted: Fri May 02, 2014 9:43 am
by Alexander Riedel
There is no line limitation. It appears that depending on processor speed the stdout buffer of the external process gets overwhelmed.
You can insert a
WScript.Sleep 10
as a work around while we investigate.
The amount of milliseconds depends on machine it seems.

Re: Output buffer limitation

Posted: Fri May 02, 2014 10:08 am
by Double Reddog
The sleep command allowed the output to display a little over 31000 items and then hung. I suspect increasing this to 20 ms will be better (on my computer). Thanks for the work around. I'll use that until an update is available.

Re: Output buffer limitation

Posted: Fri May 02, 2014 1:24 pm
by Alexander Riedel
You didn't indicate which actual PrimalScript version you use.

Re: Output buffer limitation

Posted: Fri May 02, 2014 2:21 pm
by Double Reddog
I'm using version 7.0.30. BTW, I change the sleep time to 20 ms and it did not "hang" when run via primalscript.

Re: Output buffer limitation

Posted: Mon May 05, 2014 10:36 am
by Alexander Riedel
This will be resolved with the next service build. (7.0.32)