Page MenuHomeWildfire Games

Improve performance Object List Filter Atlas
Needs ReviewPublic

Authored by trompetin17 on Jul 5 2019, 12:22 AM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#2988
Summary

Improve performance Object List Filter Atlas

From documentation https://docs.wxwidgets.org/3.0/classwx_list_box.html

List box elements are numbered from zero and while the maximal number of elements is unlimited, it is usually better to use a virtual control, not requiring to add all the items to it at once, such as wxDataViewCtrl or wxListCtrl with wxLC_VIRTUAL style, once more than a few hundreds items need to be displayed because this control is not optimized, neither from performance nor from user interface point of view, for large number of items.
Test Plan

Apply patch, build atlas, open entity tab, use filters

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 8209
Build 13377: Vulcan BuildJenkins
Build 13376: arc lint + arc unit

Event Timeline

trompetin17 created this revision.Jul 5 2019, 12:22 AM
trompetin17 edited the summary of this revision. (Show Details)Jul 5 2019, 12:24 AM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/1899/display/redirect

What's the minimal wxWidgets version that supports wxListView?

source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp
101

NULL > nullptr.

162–164

What's the minimal wxWidgets version that supports this combination of flags? (I remember asserts about alignment flags for some versions)

227

Maybe listViewItemId? Because for me itemIdListView sounds like a view of an id.

230–231

This can be inside the condition block below.

238

Is it possible to replace the itemIdListView by m_Impl->m_ObjectListView->GetItemCount()?

240

Is that true that the item takes ownership of the data pointer?

245–246

Why there is two place where the column width is set?

trompetin17 updated this revision to Diff 8741.Jul 6 2019, 8:31 AM
trompetin17 edited the summary of this revision. (Show Details)

remove listViewItemId, and Item.setWidth

trompetin17 updated this revision to Diff 8742.Jul 6 2019, 8:31 AM

Fixing missing cpp

source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp
162–164
245–246

Actually I was follow code, in wxListView you can set the size just for only cell or column, Im going to remove the item.SetWidth

Vulcan added a comment.Jul 6 2019, 8:32 AM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/differential/1913/display/redirect

trompetin17 marked 5 inline comments as done.Jul 6 2019, 8:32 AM
Vulcan added a comment.Jul 6 2019, 8:34 AM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/1914/display/redirect

this patch also solve more cleaner this https://trac.wildfiregames.com/ticket/3089
There is a patch but adding a new button, with this I can select, change tool, select the same template and add it.

wraitii added a reviewer: Restricted Owners Package.Jul 11 2019, 3:04 PM