Modify

Opened 4 years ago

Closed 4 years ago

#2312 closed enhancement (fixed)

[PATCH] Lower memory usage using string interning

Reported by: jttt Owned by: team
Priority: major 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 4 years ago.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by jttt

comment:1 Changed 4 years ago by stoecker

Could you please explain why it does what it does?

comment:2 Changed 4 years ago by jttt

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 Changed 4 years ago by jttt

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 Changed 4 years ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

In r1494.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.