#8510 closed patch
Possible list widget optimization
Reported by: | eriktorbjorn | Owned by: | lordhoto |
---|---|---|---|
Priority: | normal | Component: | GUI |
Version: | 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)
Change History (7)
by , 19 years ago
Attachment: | listwidget.diff added |
---|
comment:1 by , 19 years ago
Owner: | set to |
---|
comment:2 by , 19 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:4 by , 19 years ago
Status: | new → closed |
---|
comment:5 by , 6 years ago
Component: | → GUI |
---|
Patch against current CVS