Modify

Opened 15 years ago

Closed 15 years ago

#2312 closed enhancement (fixed)

[PATCH] Lower memory usage using string interning

Reported by: jttt Owned by: team
Priority: major Milestone:
Component: Core Version:
Keywords: Cc:

Description

JOSM memory usage can be easily reduced by interning node/way/relation keys. See attached patch.

Attachments (1)

string_intern.patch (1.3 KB ) - added by jttt 15 years ago.

Download all attachments as: .zip

Change History (5)

by jttt, 15 years ago

Attachment: string_intern.patch added

comment:1 by stoecker, 15 years ago

Could you please explain why it does what it does?

comment:2 by jttt, 15 years ago

When you load osm file then some keys are used many times, like source, name, highway etc. Currently every time source key is found then new string is created for it. When patch is applied then all source keys will point to the same object.

comment:3 by jttt, 15 years ago

String overhead is quite noticable, for example simple "source" will occupy 56 bytes of memory in Java. See
http://lists.openstreetmap.org/pipermail/josm-dev/2009-March/002730.html for benchmark

comment:4 by stoecker, 15 years ago

Resolution: fixed
Status: newclosed

In r1494.

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.