Opened 15 years ago

Closed 15 years ago

Last modified 2 years ago

#8510 closed patch

Possible list widget optimization

Reported by: eriktorbjorn Owned by: lordhoto
Priority: normal Component: GUI
Keywords: Cc:
Game:

Description

This is an attempt at speeding up screen redraws for the list widget. It's not very well tested: In fact, I've only tested it on the game list, i.e. numbered mode is untested, as is editing.

The idea is to keep track of the length of the strings, and only update as much of the line as necessary: The maximum of the current and previous lengths.

It does seem to make scrolling the game list slightly snappier. At least with the new theme. With the old theme (which is now the slower one for this case) I didn't notice much of a difference, really. Maybe there's a different bottleneck there.

Ticket imported from: #1416897. Ticket imported from: patches/615.

Attachments (2)

listwidget.diff (2.9 KB ) - added by eriktorbjorn 15 years ago.
Patch against current CVS
listwidget2.diff (3.1 KB ) - added by eriktorbjorn 15 years ago.
Updated patch

Download all attachments as: .zip

Change History (7)

by eriktorbjorn, 15 years ago

Attachment: listwidget.diff added

Patch against current CVS

comment:1 by eriktorbjorn, 15 years ago

Owner: set to lordhoto

by eriktorbjorn, 15 years ago

Attachment: listwidget2.diff added

Updated patch

comment:2 by eriktorbjorn, 15 years ago

Attached an updated version of the patch. The _textWidth[] array wasn't correctly updated (it should be updated with the current, not the max, text width), and selected lines should get the max width to be properly redrawn.

comment:3 by eriktorbjorn, 15 years ago

I've applied the updated version.

comment:4 by eriktorbjorn, 15 years ago

Status: newclosed

comment:5 by digitall, 2 years ago

Component: GUI
Note: See TracTickets for help on using tickets.