Modify

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)

get_tile_url.patch (29.5 KB ) - added by wiktorn 6 years ago.

Download all attachments as: .zip

Change History (8)

by wiktorn, 6 years ago

Attachment: get_tile_url.patch added

comment:1 by Don-vip, 6 years ago

Component: CoreCore imagery
Keywords: performance added
Summary: [PATCH] Perfromance improvements for getTileUrl[PATCH] Performance improvements for getTileUrl

comment:2 by Don-vip, 6 years ago

I've enabled tests in JMapViewer, they are now reported on Jenkins, see below:

comment:3 by Don-vip, 6 years ago

Owner: changed from team to wiktorn

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 Don-vip, 6 years ago

Milestone: 18.1018.11

comment:5 by wiktorn, 6 years ago

In 14399/josm:

GetTileUrl performance improvements for WMS

See: #16769

comment:6 by Don-vip, 6 years ago

Is this ticket fixed?

comment:7 by wiktorn, 6 years ago

Resolution: fixed
Status: newclosed

Indeed it is.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain wiktorn.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.