If I search for IID_ I get like 7500+ matching results. Can't wait for them all to load in a ListView.
I need instant results.
I thought I could use a Virtual listview, but scrolling is so cpu intensive.
Try scrolling through all 10000 rows with process visible in task manager. You can watch the CPU time grow.
My Always-running-script hardly clocks 1 sec after a full day use. Can''t really use this..
Can some improvement be done for less CPU usage?
Adapted from @just me's demo posted @ autohotkey.com/r?p=25486
Code: Select all
; Adapted from just me's demo posted @ autohotkey.com/r?p=25486
; Simplified demo of Virtual ListView (10000 rows). By SKAN
#Requires AutoHotkey v2.0-
#Warn
#SingleInstance
VarSetStrCapacity(&Str,260)
pStr := StrPtr(Str)
MyGui := Gui(,"Virtual ListView")
; +0x1140 : LVS_OWNERDATA (0x1000) | LVS_AUTOARRANGE (0x0100) | LVS_SHAREIMAGELISTS (0x0040)
MyLV := MyGui.Add("ListView", "Grid xm r16 w432 +0x1140 -Hdr +LV0x014000", ["",""])
MyLV.ModifyCol(1, "200")
MyLV.ModifyCol(2, "200")
MyGui.Show()
MyLV.OnNotify(0xFFFFFFFFFFFFFF4F, GetDisplayInfo) ; LVN_GETDISPINFO
SendMessage(0x0000102F, 10000, 0x00000001, MyLV.Hwnd) ; LVM_SETITEMCOUNT, cItems, LVSICF_NOINVALIDATEALL
GetDisplayInfo(GuiControl, lParam) ; LVN_GETDISPINFO
{
Global Str, pStr
Local szNMHDR := A_PtrSize * 3
, pLVITEMW := lParam + szNMHDR
, mask := NumGet(pLVITEMW, 0, "uint")
, iItem := NumGet(pLVITEMW, 4, "int")
, iSubItem := NumGet(pLVITEMW, 8, "int")
If mask & 1 ; LVIF_TEXT 1
Str := Format("Row: {1:} Column: {2:}", iItem, iSubItem)
, NumPut("ptr", pStr, pLVITEMW, 20 + (A_PtrSize=8?4:0)) ; pszText
}