Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11657 closed enhancement (fixed)

[patch] User - createOsmUser memory optimization

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

Description

little heuristic - when reading osm files, more changes in line have same user id usually.

Btw. what about using some primitive collections library? There are some Map<Long,..>, List<Double> etc.

We could remove it when JDK10 will come:).

Attachments (2)

userid.patch (1.2 KB ) - added by shinigami 9 years ago.
patch
createUser.patch (1.1 KB ) - added by shinigami 9 years ago.
create osm user optimization

Download all attachments as: .zip

Change History (11)

by shinigami, 9 years ago

Attachment: userid.patch added

patch

comment:1 by shinigami, 9 years ago

Type: defectenhancement
Version: latest

in reply to:  description comment:2 by bastiK, 9 years ago

Replying to shinigami:

little heuristic - when reading osm files, more changes in line have same user id usually.

Looks a little excessive... What do you gain by this optimization?

Btw. what about using some primitive collections library? There are some Map<Long,..>, List<Double> etc.

I would like that, but it should be supported by substantial performance improvement.

We could remove it when JDK10 will come:).

:)

comment:3 by bastiK, 9 years ago

Summary: User - createOsmUser memory optimization[patch] User - createOsmUser memory optimization

comment:4 by anonymous, 9 years ago

It cuts created Longs to ~1/4 in my measurements. Saved few hundred megs of garbage per minute of parsing.

comment:5 by bastiK, 9 years ago

What about just caching the last user (private static User lastUser), then compare uid with lastUser.getId()?

by shinigami, 9 years ago

Attachment: createUser.patch added

create osm user optimization

comment:6 by shinigami, 9 years ago

yep, it gives similar result.

comment:7 by Don-vip, 9 years ago

Keywords: performance added
Milestone: 15.07

comment:8 by Don-vip, 9 years ago

Resolution: fixed
Status: newclosed

In 8588/josm:

fix #11657 - User.createOsmUser() memory optimization

comment:9 by Don-vip, 9 years ago

Milestone: 15.0715.08

Milestone renamed

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.