Modify

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 taylor.smock)

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
  • 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

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
  • 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

No listeners (at least in core JOSM) actually check for which column is modified. Or even what changed in the table.

Attachments (1)

21950.patch (955 bytes ) - added by taylor.smock 3 years ago.
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 )

Download all attachments as: .zip

Change History (6)

by taylor.smock, 3 years ago

Attachment: 21950.patch added

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 )

comment:1 by taylor.smock, 3 years ago

Description: modified (diff)

comment:2 by gaben, 3 years ago

Keywords: performance added

comment:3 by stoecker, 3 years ago

Milestone: 22.03

Why don't you simply apply it?

in reply to:  3 comment:4 by taylor.smock, 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.

comment:5 by taylor.smock, 3 years ago

Resolution: fixed
Status: newclosed

In 18401/josm:

fix #21950: Significantly reduce freeze when deleting a node with the relation editor open

This specifically affected large relations, like that for Lake Huron (relation
1205151, ~14.5k members). This specifically reduced the UI freeze time when
deleting a node that is part of a way in the relation when the relation editor
is open from ~30s to <1s.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.