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 LICENSE NUMBERS, ACTIVATION 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.
This topic is 9 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Double Reddog
Posts: 14
Last visit: Mon Oct 16, 2017 8:17 am

Output buffer limitation

Post 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?
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Output buffer limitation

Post 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.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Double Reddog
Posts: 14
Last visit: Mon Oct 16, 2017 8:17 am

Re: Output buffer limitation

Post 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.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Output buffer limitation

Post by Alexander Riedel »

You didn't indicate which actual PrimalScript version you use.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Double Reddog
Posts: 14
Last visit: Mon Oct 16, 2017 8:17 am

Re: Output buffer limitation

Post 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.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Output buffer limitation

Post by Alexander Riedel »

This will be resolved with the next service build. (7.0.32)
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 9 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.