Author: Enigman
Subject: How Can I Improve Performance of Text Box Updates?
Posted: Sat Mar 31, 2012 3:02 pm (GMT -7)
Topic Replies: 0
I am working on an encryption program that works with potentially large volumes of text data. During the encryption process, or any process that updates a screen box, the program sends output periodically to the screen into a multi-line text box.
The problem is that as the output gets larger, the screen update gets slower and slower to the point that by the time the output is in the size range around 700KBytes, it takes around a full minute for a single SetVar command to update the text box with the new contents. This may lead the user to think that the program is hung or crashed if they are an impatient sort.
The basic process I am using most often is something like:
| Code: |
| Loop
… do stuff to [ProcessText]
SetVar "[ScreenBox]" "![ScreenBox][ProcessText]"
EndLoop |
… where [ScreenBox] is attached to the multi-line text box on screen.
This became most acute as a problem in the latest function which converts characters of one type to another type completely off screen by using a stack of StrReplace commands against [ProcessText] and then in a single operation at the end it updates [ScreenBox]. Not a problem if the text length is 70K, but at 700K, the program just sits there for 50 to 60 seconds waiting for the screen to update from the single SetVar command.
My question, (at last) is … can I do anything to improve the update speed of an onscreen text box?
Are there any setup parameters or hidden goodies in NB that would help this?
Should I be updating the box in a different way, other than the SetVar command?
I am open to suggestions at this juncture.
(Note: Due to the nature of this app, I chose not to use plug-ins in order to protect the plug-in developer, and other reasons)
_________________
- Enigman -
www.EnigmaCreations.com
www.ResonantEnergies.com
NeoSoft Support Forum