Modify

#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, on Jan 25, 2012 at 7:00:07 PM

Sounds good
E

Last edited on Jan 25, 2012 at 7:00:36 PM by AdmiralAlkex (previous) (diff)

comment:2 by TicketCleanup, on Jan 25, 2012 at 9:00:02 PM

Version: 3.3.8.0

Automatic ticket cleanup.

comment:3 by Jpm, on Jan 26, 2012 at 7:21:37 AM

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, on Jan 26, 2012 at 9:38:46 AM

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, on Sep 4, 2012 at 11:52:49 AM

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.