#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:
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 by , 5 years ago
Keywords: | performance relation added |
---|
comment:2 by , 5 years ago
comment:3 by , 5 years ago
Milestone: | → 19.09 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:5 by , 5 years ago
By consolidating events we get only one call with a single DataChangedEvent
. You should see the difference :)
comment:6 by , 5 years ago
Summary: | Frozen when deleting multiple relations → Improve performance when deleting a large number of relations |
---|
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) throughRelationListDialog.relationMembersChanged
2) N times with a
PrimitiveFlagsChangedEvent
(one time per deleted relation) throughRelationListDialog.otherDatasetChange