[patch] SelectionListDialog performance issues
|Reported by:||doctau@…||Owned by:||doctau@…|
When you have a number of ways selection with different names (or any objects really) and delete a tag from them, the SelectionListDialog$SelectioListModel.tagsChanged() gets called to handle the tag changes.
Via update() the CONTENTS_CHANGED listeners are called once per selected object, including TitleUpdater. That recounts the number of nodes/ways/relations which can't actually have changed in a tagsChanged event.
Because it counts the selected objects one at a time, once per selected object, this is a N2 operation - for something that will be the same as it was originally.
Ideally the updater wouldn't need to be called for something that won't have changed, but I don't know enough about JOSM's code to know if that's possible to fix.
Having the SelectionListDialog either maintain counts itself (updated when the selection changes), or a "counts dirty" flag so it only recomputes it once after being changed would be good, and reduce it to an O(n) thing rather than O(n2).
Change History (23)
comment:1 Changed 3 years ago by bastiK
- Owner changed from team to doctau@…
- Status changed from new to needinfo
Changed 3 years ago by doctau
comment:5 Changed 2 years ago by stoecker
- Summary changed from SelectionListDialog performance issues to [patch needs rework] SelectionListDialog performance issues
Changed 2 years ago by ax
comment:13 Changed 2 years ago by ax
- Summary changed from [patch needs rework] SelectionListDialog performance issues to [patch] SelectionListDialog performance issues
comment:16 Changed 2 years ago by stoecker
- Resolution set to fixed
- Status changed from needinfo to closed