﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
11514	Large GPX files combined with Bing Imagery causes memory exhaustion and crash	mcpicoli	mcpicoli	"==== What steps will reproduce the problem?
1. Open JOSM, drag one or more LARGE (> 20MB each) GPX files into it, or open them using the ""File"" menu. Wait for it to finish loading.
2. Add Bing Imagery to a new layer, using the ""Imagery"" menu.
3. Zoom in, and start dragging around, WITHOUT adding data layers, or anything else. Just keep dragging around, preferably when zoomed in and showing parts of the GPX tracks.

==== What is the expected result?
It is expected that JOSM will keep working normally - background consisting of Bing Imagery, overlayed by parts of the tracks defined in one or more of the GPX files loaded.
It is expected that JOSM's performance will be mostly constant along time, if no other operations besides zooming in/out and dragging the screen around are done.

==== What happens instead?
Almost immediately, performance (measured by ""speed"" of dragging the map) degrades VERY sharply, and gets much worse (to the point of being unusable) after only a few minutes. If one insists some more, JOSM will crash with an ""out of memory"" error, and not respond anymore to user input (most of the times).

==== Please provide any additional information below. Attach a screenshot if possible.
- All plugins were disabled
- Reverting to an VERY old and obsolete version of JOSM (5608) - with the ancient imagery cache directory - solves completely the problem
- Reverting to a recent version like 8159 that uses the newer (but not newest, DB based) cache mechanism - does NOT solve the problem.
- Installing a plugin like ""ImageryCache"" does NOT solve the problem.
- Increasing the JVM's memory allocation postpones the problem, but performance gets really unusable, very quickly.
- Also tried: lowering the maximum number of concurrent downloads to 1, lowering ""jcs.cache.max_objects_in_memory"" from 10k to 100. None changed anything related to the problem.
- My GPX files consist of many (a few hundreds in each file) tracks.
- While it is expected that with large GPX files the performance won't be as good as with small files, it is expected that it wouldn't degrade with time by simply dragging the map around.
- Probably not related, but may be useful info: Intel i7-3770 CPU, 32GB RAM, 2x Apple Cinema Displays (via TB).

{{{
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-05-08 01:31:23
Last Changed Author: stoecker
Revision: 8339
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-05-07 17:30:43 +0200 (Thu, 07 May 2015)
Last Changed Rev: 8339

Identification: JOSM/1.5 (8339 en) Windows 7 64-Bit
Memory Usage: 166 MB / 455 MB (62 MB allocated, but free)
Java version: 1.7.0_21, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
}}}
"	defect	closed	normal		Core	tested	irreproducible	GPX, memory, Bing, performance	
