Changes between Initial Version and Version 1 of Ticket #16510, comment 1


Ignore:
Timestamp:
2018-07-23T13:51:14+02:00 (8 years ago)
Author:
GerdP

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16510, comment 1

    initial v1  
    11Reg. the Selection List Window:
    22The main problem here is that method org.openstreetmap.josm.tools.ImageProvider.get(OsmPrimitiveType type) is called very often (twice for each element in the list). Each call uses getIfAvailableImpl() which does quite a lot of computations before it finally finds the result in the cache. All this happens in a synchronized block.
    3 The attached quick+dirty patch improves performance of the a lot but maybe has unwanted side effects.
     3The attached quick+dirty patch improves performance of the Selection List Window a lot but maybe has unwanted side effects.
    44
    55I think the synchronized routine which checks + updates the cache should be as simple as possible, all other calculations should be done before calling it.