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
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Faster Macro Execution
Life IS mystical. It's just that we're used to it.
-
- Posts: 1
- Joined: Tue Mar 06, 2007 2:32 pm
Yes, it does.nvj1662 wrote:I wonder wether simply minimising the textpad window would have the same effect.
I often compute files of 10 000 to 20 000 000 lines with complex macros.
Minimising the textpad window (I´m using 4.7.2) saves CPU time and reduces memory usage.
In addition I usualy force textpad to use one of my CPUs only, thus making it possible to actually use my PC for other tasks (decent machine, but visible textpad operation slows it down to abakus speed...).
To check whether my macro finished I just watch the Task Manager.
Thanks for adding that, Arathorn76. I often do the same when I am "flossing & glossing" a set of CSV entries for a Dbase.Yes, it does.
I often compute files of 10 000 to 20 000 000 lines with complex macros.
The longest one I've done, so far, was 182,000 line entries. This was a complete copy of the 1913 Webster's Unabridged Dictionary, for which I worte a simple search engine.
http://fredsitelive.com/books/BigDic/index.php
If you enter coro* in the form, it will return all words (66 of them) starting with "coro" and anything (*) after that. Ex:
Corocore
Corody
Corol
Corolla
Corollaceous
Corollaries
Corollary
Corollary
Corollate
Corollated
Corollet
Corollifloral
Corolliflorous
Corolline
Coromandel
Another odd one I came up with will calculate the "as the crow flies" distance between any two US zip codes. This was a 42,000+ line Database. http://fredsitelive.com/reference/ziplat1.php
Ex: Using Riverside, Ca, 92509 and Boulder, Co. 90310, The distance between cities: 788.6 miles. Or: 1,269.1 Kilometers.
I had never been adventurous enough to try minimizing the window, because in my experience some clicks on the TextPad window will stop the macro. If the window is minimized, it's hard to tell if that's happened. will give it a shot though, thanks,
Fred
Life IS mystical. It's just that we're used to it.
Never too late for tips.
Yes, Minimizing text pad while it runs a macro or search and replace speeds it up 10x.
I was going to suggest this be added into the program. Where it minimized it self until done.
Be allot nicer to see the then TP frozen
Selvol
I was going to suggest this be added into the program. Where it minimized it self until done.
Be allot nicer to see the then TP frozen
Selvol