Modify

Opened 9 years ago

Closed 9 years ago

#11767 closed enhancement (fixed)

[Patch] Use Arrays.copyOf in OsmPrimitive#put(String, String)

Reported by: michael2402 Owned by: team
Priority: normal Milestone: 15.08
Component: Core Version:
Keywords: performance Cc:

Description

This increases performance for OsmPrimitive#put(String, String) on primitives that already have a lot of keys set. And it cleans up code.

Before patch

TIMER OsmPrimitive#put(String, String) with put/node ratio 0.05: 118ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 0.3: 97ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 3.0: 131ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 20.0: 221ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 200.0: 923ms

With patch applied

TIMER OsmPrimitive#put(String, String) with put/node ratio 0.05: 113ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 0.3: 90ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 3.0: 122ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 20.0: 205ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 200.0: 859ms
]]]

Attachments (1)

0001-Use-Arrays.copyOf.patch (1.1 KB ) - added by michael2402 9 years ago.

Download all attachments as: .zip

Change History (4)

by michael2402, 9 years ago

comment:1 by Don-vip, 9 years ago

Milestone: 15.08

comment:2 by Don-vip, 9 years ago

Keywords: performance added

comment:3 by Don-vip, 9 years ago

Resolution: fixed
Status: newclosed

In 8652/josm:

fix #11767 - Use Arrays.copyOf in OsmPrimitive#put(String, String) (patch by michael2402)

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.