﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
16769	[PATCH] Performance improvements for getTileUrl	wiktorn	wiktorn	"getTileUrl is called in EDT thread. Going through profiles in #16760 and #16734 I noticed that there are some easy optimizations for getTileUrl.

I've optimized getTileUrl for TMS and for WMS. Performance check was to call getTileUrl 10000 times  in 20 rounds, each measured separately. From this 20 rounds I discarded 3 slowest results.

Effects for TMS:
{{{
x current
+ optimized
+--------------------------------------------------------------------------------+
|  + +                                                   xx                      |
| ++ +      + +                                          xx                      |
|+++++      +++    +        +                           xxxx  x       x  x      x|
||___M___A______|                                     |___M__A_____|             |
+--------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  17           136           175           138     143.05882     11.294194
+  17            45            90            52     57.352941     12.338665
Difference at 95.0% confidence
        -85.7059 +/- 8.26402
        -59.9095% +/- 5.77666%
        (Student's t, pooled s = 11.828)
}}} 

Effects for WMS:
{{{
x current
+ optimized
+--------------------------------------------------------------------------------+
|           +                                                                    |
|           +                                                 x  x               |
|          ++                                                 x  x               |
|   +      ++ +                                               xxxx               |
|+  +     +++++      +  +                                    xxxxxx  x x        x|
|     |_____A____|                                           |__MA____|          |
+--------------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  17           201           226           204     206.17647     6.1464959
+  17           120           151           135     134.35294     7.4660999
Difference at 95.0% confidence
        -71.8235 +/- 4.77775
        -34.8359% +/- 2.31731%
        (Student's t, pooled s = 6.8382)
}}}


Few things I'd like to have reviewed:
* I put a tests for TemplatedTMSTileSource in JOSM repository, though the file comes from JMapViewer, but JMapViewer doesn't have any tests at all
* I'm not sure if all edge cases are covered in TemplatedTMSTileSorce"	defect	closed	normal	18.11	Core imagery		fixed	performance	
