Opened 6 years ago
Closed 6 years ago
#16769 closed defect (fixed)
[PATCH] Performance improvements for getTileUrl
Reported by: | wiktorn | Owned by: | wiktorn |
---|---|---|---|
Priority: | normal | Milestone: | 18.11 |
Component: | Core imagery | Version: | |
Keywords: | performance | Cc: |
Description
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
Attachments (1)
Change History (8)
by , 6 years ago
Attachment: | get_tile_url.patch added |
---|
comment:1 by , 6 years ago
Component: | Core → Core imagery |
---|---|
Keywords: | performance added |
Summary: | [PATCH] Perfromance improvements for getTileUrl → [PATCH] Performance improvements for getTileUrl |
comment:2 by , 6 years ago
comment:3 by , 6 years ago
Owner: | changed from | to
---|
Also, if you add new tests making calls to real servers on the Internet, please flag them as integration tests (i.e add them in the FooTestIT
class instead of FooTest
). Unit tests must be fast and reliable, so cannot use external servers.
comment:4 by , 6 years ago
Milestone: | 18.10 → 18.11 |
---|
I've enabled tests in JMapViewer, they are now reported on Jenkins, see below: