Script & Hotkey Performance
基本スクリプト
NoTrayIconスクリプト
大容量スクリプト
大容量コメント付きスクリプト
大量に変数を使用するスクリプト
計算しまくるスクリプト
ウィンドウ探索しまくるスクリプト
サブルーチンを呼び出しまくるスクリプト
GUIウィンドウを10個作成
GUIウィンドウ1にコントロール大量
メニューを大量に作成
定数を足しまくるスクリプト
変数を足しまくるスクリプト
文字列判定をやりまくるスクリプト
変数参照の混ざった文字列判定をやりまくるスクリプト
Scripts are semi-compiled while they're being loaded and syntax-checked. In addition to reducing the memory consumed by the script, this process also enhances runtime performance (by orders of magnitude in some cases). The performance boost is greatest when SetBatchLines is -1, meaning that the script is running at maximum speed.
In addition to SetBatchLines, the following commands may also affect performance depending on the nature of the script: SetKeyDelay, SetMouseDelay, SetWinDelay, SetControlDelay, and SetDefaultMouseSpeed.
Here are the technical details of the semi-compiling process:
- Input and output variables (when their names don't contain references to other variables) and group names are resolved to memory addresses.
- Loops, blocks, IFs, and ELSEs are given the memory addresses of their related jump-points in the script.
- The destination of each Hotkey, Gosub, and Goto is resolved to a memory address unless it's a variable.
- Command names are replaced with their addresses in a jump table.
- Each line is parsed into a list of parameters.
- Each parameter is parsed into a list of variable references (if any).
- Each variable reference is resolved to a memory address.