Faster Macro Execution
Posted: Wed Apr 11, 2007 6:14 am
Ok, I've been using TextPad for roughly ten years, but today is the first day I have participated in this form. I searched the Tips section on either/or/and "speed" and "screen" and came up blank before posting this. Maybe I'm posting the obvious, I don't know. But...
Faster Macro Execution:
If you process long files for CSV or any other reason, this is highly worth your time to use.
When you are executing a macro over a large file, you can speed up the process by a factor of 10, at least.
Heres how:
1. Open any other window, a browser perhaps, and size it's window so it completely covers both the text window, and the Document Selector window (if open) of TextPad, plus enough so you can bring it forward by clicking on it after you start the macro.
2. Then bring TextPad forward, and start your macro.
3. Click on the "other window" with the mouse, and keep the mouse off of any still-visible portion of TextPad while the macro runs. If I am not explaining this clear enough, please see this example here.
If you want to see the difference in speed, place the other window so that only the scroll indicator of the text window can be seen (see picture), to indicate progress.
Updating the screen at each line shift in text takes a huge amount of your computer's CPU time. Cover the window and Windows no longer does this, freeing up CPU time for the real work of making the changes.
Re. Mouse:
While a macro is executing, TextPad shows you an hourglass mouse pointer. Whether it's Textpad's, or Micro$not's programming I don't know, but a decision is made at the end of each macro execution, to determine whether or not to keep the hourglass, or switch back to the normal pointer. Keep your mouse off the TextPad window, as this also eats up CPU time, and slows macro execution.
Re Document Selector Box:
I sometimes will write macros that process a line, then copy/paste it to another window as I go. The current file is highlighted in the "Doc. Sel. Box" each time you switch files. Updating this box also eats CPU time, and slows down multi-window macros.
Hope this helps.
Fred
Faster Macro Execution:
If you process long files for CSV or any other reason, this is highly worth your time to use.
When you are executing a macro over a large file, you can speed up the process by a factor of 10, at least.
Heres how:
1. Open any other window, a browser perhaps, and size it's window so it completely covers both the text window, and the Document Selector window (if open) of TextPad, plus enough so you can bring it forward by clicking on it after you start the macro.
2. Then bring TextPad forward, and start your macro.
3. Click on the "other window" with the mouse, and keep the mouse off of any still-visible portion of TextPad while the macro runs. If I am not explaining this clear enough, please see this example here.
If you want to see the difference in speed, place the other window so that only the scroll indicator of the text window can be seen (see picture), to indicate progress.
Updating the screen at each line shift in text takes a huge amount of your computer's CPU time. Cover the window and Windows no longer does this, freeing up CPU time for the real work of making the changes.
Re. Mouse:
While a macro is executing, TextPad shows you an hourglass mouse pointer. Whether it's Textpad's, or Micro$not's programming I don't know, but a decision is made at the end of each macro execution, to determine whether or not to keep the hourglass, or switch back to the normal pointer. Keep your mouse off the TextPad window, as this also eats up CPU time, and slows macro execution.
Re Document Selector Box:
I sometimes will write macros that process a line, then copy/paste it to another window as I go. The current file is highlighted in the "Doc. Sel. Box" each time you switch files. Updating this box also eats CPU time, and slows down multi-window macros.
Hope this helps.
Fred