#3875 closed Bug (Fixed)
GUICtrlSetResizing() performance
| Reported by: | KaFu | Owned by: | Jon |
|---|---|---|---|
| Milestone: | 3.3.16.1 | Component: | AutoIt |
| Version: | 3.3.15.5 | Severity: | None |
| Keywords: | Cc: |
Description (last modified by )
Hiho Team,
maybe you saw my posting in the open help forum about GUICtrlSetResizing() performance.
I've tracked it further down, and it seems that as of 3.3.15.5 the Windows Message pump for a certain Window is engaged on the first call of GUISetState() for that Window.
This degrades the performance of GUICtrlSetResizing() after that call drastically, and the time increase per call is also proportional to the amount of controls.
100 calls in 3.3.14.5 take 0.2ms, in 3.3.15.5 690ms on my computer.
Best Regards
#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=Beta #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Local $hGUI = GUICreate("Example", Default, Default, Default, Default, $WS_OVERLAPPEDWINDOW, $WS_EX_ACCEPTFILES) ; GUISetState(@SW_HIDE, $hGUI) GUISetState(@SW_LOCK, $hGUI) For $i = 0 To 32768 GUIRegisterMsg($i, "WM_MESSAGE") Next ConsoleWrite("Start" & @CRLF) Local $i_Count = 100 Local $controls[$i_Count] Local $iTimer = TimerInit() For $i = 0 To ($i_Count / 4) - 1 $controls[$i] = GUICtrlCreateLabel("OK", $i * 2, $i * 2, 85, 25) GUICtrlSetColor(-1, 0x0000ff) GUICtrlSetBkColor(-1, 0x0000ff) GUICtrlSetCursor(-1, 1) GUICtrlSetTip(-1, "tip of my label") Next ConsoleWrite(TimerDiff($iTimer) & @CRLF) Local $iTimer = TimerInit() For $i = ($i_Count / 4) To ($i_Count / 2) - 1 $controls[$i] = GUICtrlCreateButton("OK", $i * 2, $i * 2, 85, 25) Next ConsoleWrite(TimerDiff($iTimer) & @CRLF) Local $iTimer = TimerInit() For $i = ($i_Count / 2) To ($i_Count / 4) * 3 - 1 $controls[$i] = GUICtrlCreateEdit("OK", $i * 2, $i * 2, 85, 25) Next ConsoleWrite(TimerDiff($iTimer) & @CRLF) Local $iTimer = TimerInit() For $i = ($i_Count / 4) * 3 To $i_Count - 1 $controls[$i] = GUICtrlCreateCheckbox("OK", $i * 2, $i * 2, 85, 25) Next ConsoleWrite(TimerDiff($iTimer) & @CRLF) Local $iTimer = TimerInit() For $i = 0 To $i_Count - 1 Local $iTimer2 = TimerInit() ; GUICtrlSetResizing($controls[$i], $GUI_DOCKVCENTER + $GUI_DOCKHCENTER + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlSetResizing($controls[$i], $GUI_DOCKBOTTOM + $GUI_DOCKHCENTER + $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) ConsoleWrite($i & @TAB & Round(TimerDiff($iTimer)) & @TAB & Round(TimerDiff($iTimer2)) & @CRLF) Next ConsoleWrite(TimerDiff($iTimer) & @CRLF) Exit Func WM_MESSAGE($hWnd, $iMsg, $wParam, $lParam) If $iMsg = 0x0005 Then ConsoleWrite("0x" & Hex($iMsg, 4) & @TAB & "WM_MESSAGE" & @CRLF) Return $GUI_RUNDEFMSG EndFunc ;==>WM_MESSAGE
Attachments (0)
Change History (11)
comment:1 by , 4 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:2 by , 4 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 4 years ago
| Milestone: | → 3.3.15.6 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | assigned → closed |
Fixed by revision [12714] in version: 3.3.15.6
comment:5 by , 4 years ago
| Milestone: | 3.3.15.6 → 3.3.16.1 |
|---|
Fixed by revision [12717] in version: 3.3.16.1
comment:6 by , 4 years ago
| Resolution: | Fixed |
|---|---|
| Status: | closed → reopened |
THe solution is not complete so I will work again on it
comment:8 by , 4 years ago
| Milestone: | → 3.3.15.6 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | reopened → closed |
Fixed by revision [12745] in version: 3.3.15.6
comment:9 by , 4 years ago
| Milestone: | 3.3.15.6 → 3.3.16.1 |
|---|
Fixed by revision [12746] in version: 3.3.16.1

Thanks
Fix sent to Jon