Modify

Opened 14 years ago

Closed 14 years ago

#2114 closed Feature Request (Completed)

Performance increase to _ArrayDisplay()

Reported by: Beege Owned by: guinness
Milestone: 3.3.9.5 Component: Standard UDFs
Version: Severity: None
Keywords: _arraydisplay Cc:

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:

Before - 6569.94750836973
After - 1508.47224799844

Attachments (0)

Change History (5)

comment:1 by AdmiralAlkex, 14 years ago

Sounds good
E

Last edited 14 years ago by AdmiralAlkex (previous) (diff)

comment:2 by TicketCleanup, 14 years ago

Version: 3.3.8.0

Automatic ticket cleanup.

comment:3 by J-Paul Mesnage, 14 years ago

Don't fully understand why not redrawing something which is not an displayed windows as an perf impact. But well it has.
Not sure such big length of arraydisplay is something we have to optimized. The user will take sometime to look at ...

comment:4 by Beege, 14 years ago

Don't fully understand why not redrawing something which is not an displayed windows as an perf impact.

I agree and have been kinda wondering the same thing. I was always under the impression if a window was minimized or not visible, the redraw would not happen.

Not sure such big length of arraydisplay is something we have to optimized.

ok then :(

comment:5 by guinness, 14 years ago

Milestone: 3.3.9.5
Owner: set to guinness
Resolution: Completed
Status: newclosed

Added by revision [7242] in version: 3.3.9.5

Modify Ticket

Action
as closed The owner will remain guinness.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.