[PATCH] Heap memory growing and CPU load while idle
|Reported by:||akks||Owned by:||team|
I ran JOSM in the profiler and noticed that constant memory allocation takes place, even when user does not move the mouse. Profiler said it is MapStatus.Collector run method, which regularly invokes statusBarElementUpdate => getNearestNodeOrWay, that need relatively much resources.
In this patch statusBarElementUpdate is called only when mouse position have changed. Profiler shows it removes endless "memory growing - garbage collecting" cycle.
This should do small improvement of JOSM behaviour in the background.
Are there any important cases when statusbar info about element under cursor needs to be updated without moving the mouse?
If it is OK, I can try to commit it.