Custom Query (3931 matches)
Results (112 - 114 of 3931)
| Ticket | Resolution | Summary | Owner | Reporter |
|---|---|---|---|---|
| #2114 | Completed | Performance increase to _ArrayDisplay() | ||
| Description |
I notice today that _arraydisplay() does not disable redraw before adding new items to the listview. This can have a big impact on the performance. Changing the main loop that adds the listview items to: GUICtrlSendMsg($hListView, 11, 0, 0);$WM_SETREDRAW ; Fill listview For $i = 0 To $iUBound GUICtrlCreateListViewItem($avArrayText[$i], $hListView) Next GUICtrlSendMsg($hListView, 11, 1, 0);$WM_SETREDRAW For a quick test I ran this small script: Global $g_aArray[1] = [1] For $i = 2 To 20 _ArrayAdd($g_aArray, $i) Next Global $g_aArrayCombo = _ArrayCombinations($g_aArray, 7, ",") _ArrayDisplay($g_aArrayCombo) My times before and after were:
|
|||
| #2120 | Completed | Improvements to _GuiCtrlListView_DeleteAllItems | ||
| Description |
I was noticing how deleting all items it a autoit listview took almost 3x longer than it takes to add them. I came up with the following improvements below. Time Results: _GUICtrlListView_DeleteAllItems = 3592.88679294215 _GUICtrlListView_DeleteAllItems2 = 587.438691126462 #include <GuiListView.au3>
Opt('MustDeclareVars', 1)
Local $hGUI = GUICreate('Listview Delete All Items', 250, 400)
Local $ListView = GUICtrlCreateListView('Items', 0, 0, 248, 398)
GUISetState()
For $i = 1 To 10000
GUICtrlCreateListViewItem($i, $ListView)
Next
Local $time = TimerInit()
_GUICtrlListView_DeleteAllItems($ListView)
ConsoleWrite('_GUICtrlListView_DeleteAllItems = ' & TimerDiff($time) & @LF)
For $i = 1 To 10000
GUICtrlCreateListViewItem($i, $ListView)
Next
Local $time = TimerInit()
_GUICtrlListView_DeleteAllItems2($ListView)
ConsoleWrite('_GUICtrlListView_DeleteAllItems2 = ' & TimerDiff($time) & @LF)
Do
Until GUIGetMsg() = -3
Func _GUICtrlListView_DeleteAllItems2($hWnd)
If $Debug_LV Then __UDF_ValidateClassName($hWnd, $__LISTVIEWCONSTANT_ClassName)
If _GUICtrlListView_GetItemCount($hWnd) = 0 Then Return True
If IsHWnd($hWnd) Then
Return _SendMessage($hWnd, $LVM_DELETEALLITEMS) <> 0
Else
Local $ctrlID
Local $tItem = DllStructCreate($tagLVITEM)
Local $pItem = DllStructGetPtr($tItem)
Local $LV_Msg = $LVM_GETITEMA
If _GUICtrlListView_GetUnicodeFormat($hWnd) Then $LV_Msg = $LVM_GETITEMW
DllStructSetData($tItem, "Mask", $LVIF_PARAM)
GUICtrlSendMsg($hWnd, 11, 0, 0);$WM_SETREDRAW
For $index = _GUICtrlListView_GetItemCount($hWnd) - 1 To 0 Step -1
DllStructSetData($tItem, "Item", $index)
GUICtrlSendMsg($hWnd, $LV_Msg, 0, $pItem)
$ctrlID = DllStructGetData($tItem, "Param")
If $ctrlID Then GUICtrlDelete($ctrlID)
Next
GUICtrlSendMsg($hWnd, 11, 1, 0);$WM_SETREDRAW
If _GUICtrlListView_GetItemCount($hWnd) = 0 Then Return True
EndIf
Return False
EndFunc ;==>__GUICtrlListView_DeleteAllItems
|
|||
| #2141 | Fixed | AU3Check keyword #IgnoreFunc causing error | ||
| Description |
The following script causes an error: #include <GuiListView.au3> #include <SQLite.au3> Output: C:\Program Files (x86)\AutoIt3\Include\SQLite.au3(2,13) : ERROR: missing separator character after keyword. #IgnoreFunc __SQLite_Inline_Version ~~~~~~~~~~~~^ |
|||
Note:
See TracQuery
for help on using queries.
