Modify

Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#18144 closed enhancement (fixed)

Improve performance when deleting a large number of relations

Reported by: naoliv Owned by: Don-vip
Priority: normal Milestone: 19.09
Component: Core Version:
Keywords: performance relation Cc:

Description

While deleting a lot of relations (1600+ for my case) JOSM freezes without any kind of feedback (can't scroll anything, move the map, click anywhere).

I know that JOSM is still processing them, but it seems to take a lot of time (running for around 15 minutes until now) without any kind of feedback.

Maybe something about this could be improved?

With VisualVM I can see that the hot spots are:

https://i.imgur.com/p2tIgcu.png

https://i.imgur.com/4FwvK1F.png

JOSM:

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-09-17 09:15:17 +0200 (Tue, 17 Sep 2019)
Revision:15354
Build-Date:2019-09-18 01:30:52
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (15354 pt_BR) Linux Debian GNU/Linux bullseye/sid
Memory Usage: 467 MB / 6144 MB (305 MB allocated, but free)
Java version: 13+33-Debian-1, Debian, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900, :0.1 1280x1024
Maximum Screen Size: 1600x1024
Java ATK Wrapper package: libatk-wrapper-java:all-0.36.0-1
libcommons-compress-java: libcommons-compress-java:all-1.18-2
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:-
liboauth-signpost-java: liboauth-signpost-java:all-1.2.1.2-2
VM arguments: [-Dawt.useSystemAAFontSettings=gasp]

Attachments (0)

Change History (6)

comment:1 Changed 2 months ago by Don-vip

Keywords: performance relation added

comment:2 Changed 2 months ago by Don-vip

The relation comparator defined in DefaultNameFormatter is very costly and must be called wisely.

Currently, when we delete N relations we call it:
1) N times with a RelationMembersChangedEvent (one time per deleted relation) through RelationListDialog.relationMembersChanged
2) N times with a PrimitiveFlagsChangedEvent (one time per deleted relation) through RelationListDialog.otherDatasetChange

comment:3 Changed 2 months ago by Don-vip

Milestone: 19.09
Owner: changed from team to Don-vip
Status: newassigned

comment:4 Changed 2 months ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 15355/josm:

fix #18144 - consolidate events in RelationListDialog

comment:5 Changed 2 months ago by Don-vip

By consolidating events we get only one call with a single DataChangedEvent. You should see the difference :)

comment:6 Changed 2 months ago by Don-vip

Summary: Frozen when deleting multiple relationsImprove performance when deleting a large number of relations

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.