Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 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 6 years ago.
patch
createUser.patch (1.1 KB) - added by shinigami 6 years ago.
create osm user optimization

Download all attachments as: .zip

Change History (11)

Changed 6 years ago by shinigami

Attachment: userid.patch added

patch

comment:1 Changed 6 years ago by shinigami

Type: defectenhancement
Version: latest

comment:2 in reply to:  description Changed 6 years ago by bastiK

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 Changed 6 years ago by bastiK

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

comment:4 Changed 6 years ago by anonymous

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

comment:5 Changed 6 years ago by bastiK

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

Changed 6 years ago by shinigami

Attachment: createUser.patch added

create osm user optimization

comment:6 Changed 6 years ago by shinigami

yep, it gives similar result.

comment:7 Changed 6 years ago by Don-vip

Keywords: performance added
Milestone: 15.07

comment:8 Changed 6 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 8588/josm:

fix #11657 - User.createOsmUser() memory optimization

comment:9 Changed 6 years ago by Don-vip

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.