Modify

Opened 8 years ago

Closed 8 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 8 years ago.

Download all attachments as: .zip

Change History (6)

by GerdP, 8 years ago

Attachment: 13439.patch added

comment:1 by GerdP, 8 years ago

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 by GerdP, 8 years ago

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

comment:3 by Don-vip, 8 years ago

Keywords: performance added

comment:4 by Don-vip, 8 years ago

Milestone: 16.08

comment:5 by Don-vip, 8 years ago

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