Modify

Opened 3 years ago

Closed 3 years ago

#13439 closed enhancement (fixed)

[Patch] Node.toString() and Way.toString() causing performance problems

Reported by: GerdP Owned by: team
Priority: normal Milestone: 16.08
Component: Core Version:
Keywords: performance Cc:

Description

These methods are called heavily by
javax.swing.DefaultListCellRenderer.getListCellRendererComponent(JList, Object, int, boolean,boolean) which is called by
org.openstreetmap.josm.gui.OsmPrimitivRenderer.getListCellRendererComponent(JList, OsmPrimitive, int, boolean, boolean)

When you load a dataset with many ways and nodes and press Strg+A to select all objects
or search for something that appers very often. Since these methods are rather complex,
the dialog reacts very slow.
If I got that right, the result of the toString() is not even used in these cases.
I think it would be a good idea to not use DefaultListCellRenderer here.

Attachments (1)

13439.patch (733 bytes) - added by GerdP 3 years ago.

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by GerdP

Attachment: 13439.patch added

comment:1 Changed 3 years ago by GerdP

Summary: Node.toString() and Way.toString() causing performance problems[Patch} Node.toString() and Way.toString() causing performance problems

The attached patch solves the problem. Since the value is not used we can pass a null value
so that toString() is not called.

comment:2 Changed 3 years ago by GerdP

Summary: [Patch} Node.toString() and Way.toString() causing performance problems[Patch] Node.toString() and Way.toString() causing performance problems

comment:3 Changed 3 years ago by Don-vip

Keywords: performance added

comment:4 Changed 3 years ago by Don-vip

Milestone: 16.08

comment:5 Changed 3 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 10889/josm:

fix #13439 - Node.toString() and Way.toString() causing performance problems (patch by Gerd Petermann)

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.