Opened 3 years ago
Closed 3 years ago
#21950 closed defect (fixed)
[PATCH] Significantly reduce freeze when deleting a node with the relation editor open
Reported by: | taylor.smock | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 22.03 |
Component: | Core | Version: | |
Keywords: | performance | Cc: |
Description (last modified by )
From comment:36:ticket:21825 (test relation was Lake Huron):
Measurements (async profiler) for attachment:21825.avoid_loop_MemberTableModel_wayNodesChanged.patch:ticket:21825
Original code (no patches, jar downloaded from website, 30s for update on node delete, profiling was ~36s long, EDT blocked for ~30s):
- CPU
- EDT: 69.31% of all
- MemberTableModel#wayNodesChanged: 65.89% of all, 95% of EDT
- G1: 21.09% of all
- EDT: 69.31% of all
- Memory
- EDT: 80.75% of all
- MemberTableModel#wayNodesChanged: 66.93% of all, 82% of EDT
- MapView painting: 13.07% of all, 16.18% of EDT
- AutoSaveTask: 19.16% of all
- EDT: 80.75% of all
New code (~6s for update on node delete -- most of time is from moving mouse to start/stop profiling, also has validator changes, EDT blocked for <1s at any time):
- CPU
- EDT: 16.99% of all
- MemberTableModel#wayNodesChanged: 1.98% of all, 11.65% of EDT
- G1: 6.31% of all
- Validation: 68.41% of all
- EDT: 16.99% of all
- Memory
- EDT: 97.76% of all
- MemberTableModel#wayNodesChanged: 6.04% of all, 6.17% of EDT
- MapView painting: 79.59% of all, 81.41% of EDT
- Validation: 1.48% of all
- EDT: 97.76% of all
No listeners (at least in core JOSM) actually check for which column is modified. Or even what changed in the table.
Attachments (1)
Change History (6)
by , 3 years ago
Attachment: | 21950.patch added |
---|
comment:1 by , 3 years ago
Description: | modified (diff) |
---|
comment:2 by , 3 years ago
Keywords: | performance added |
---|
comment:4 by , 3 years ago
Replying to stoecker:
Why don't you simply apply it?
Short answer: It takes me some time to get svn up and running on my work computer (I have to use svn in a docker container), and I was out of work time for the week.
And then I had some different work to do. Which I just finished.
I'll be pulling it down on my home computer now that I've got a minute.
Standalone patch: Avoid loop in MemberTableModel#wayNodesChanged. This decreases UI freeze from ~20s to <1s for Lake Huron. (Same as attachment:21825.avoid_loop_MemberTableModel_wayNodesChanged.patch:ticket:21825 )