Output buffer limitation

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Double Reddog
Posts: 14
Joined: Sun Mar 03, 2013 12:39 pm

Output buffer limitation

Post by Double Reddog » Fri May 02, 2014 9:17 am

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?

User avatar
Alexander Riedel
Posts: 7005
Joined: Tue May 29, 2007 4:43 pm

Re: Output buffer limitation

Post by Alexander Riedel » Fri May 02, 2014 9:43 am

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.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
Double Reddog
Posts: 14
Joined: Sun Mar 03, 2013 12:39 pm

Re: Output buffer limitation

Post by Double Reddog » Fri May 02, 2014 10:08 am

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.

User avatar
Alexander Riedel
Posts: 7005
Joined: Tue May 29, 2007 4:43 pm

Re: Output buffer limitation

Post by Alexander Riedel » Fri May 02, 2014 1:24 pm

You didn't indicate which actual PrimalScript version you use.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
Double Reddog
Posts: 14
Joined: Sun Mar 03, 2013 12:39 pm

Re: Output buffer limitation

Post by Double Reddog » Fri May 02, 2014 2:21 pm

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.

User avatar
Alexander Riedel
Posts: 7005
Joined: Tue May 29, 2007 4:43 pm

Re: Output buffer limitation

Post by Alexander Riedel » Mon May 05, 2014 10:36 am

This will be resolved with the next service build. (7.0.32)
Alexander Riedel
SAPIEN Technologies, Inc.