Modify

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11709 closed enhancement (fixed)

[Patch] New performance test for MapCSSStyleSource#apply and for OsmPrimitive#get/put/getKeys

Reported by: michael2402 Owned by: team
Priority: normal Milestone: 15.08
Component: Core mappaint Version:
Keywords: gsoc Cc:

Description

Some tests that test the performance of those methods. I use those to tweak the MapCSS performance a bit.

Change History (11)

comment:1 by michael2402, 9 years ago

Patch 0004 is optional. You can add if if you think that the test is running too long.

comment:2 by michael2402, 9 years ago

Component: CoreCore mappaint
Keywords: gsoc added

comment:3 by Don-vip, 9 years ago

Milestone: 15.07

comment:4 by bastiK, 9 years ago

Resolution: fixed
Status: newclosed

In 8623/josm:

applied #11709 - New performance test for MapCSSStyleSource#apply and for OsmPrimitive#get/put/getKeys (patch by michael2402)

comment:5 by bastiK, 9 years ago

Thanks, very interesting results!

TIMER OsmPrimitive#getKeys() with tag/node ratio 0.05: 39ms
TIMER OsmPrimitive#getKeys() with tag/node ratio 0.3: 10ms
TIMER OsmPrimitive#getKeys() with tag/node ratio 3.0: 40ms
TIMER OsmPrimitive#getKeys() with tag/node ratio 20.0: 112ms
TIMER OsmPrimitive#getKeys() with tag/node ratio 200.0: 374ms
TIMER Assertion overhead.: 2ms
TIMER str1.equals(str2) succeeds (without intern): 18ms
TIMER str1 == str2 succeeds: 3ms
TIMER str1 == str2.intern() succeeds: 609ms
TIMER str1 == str2.intern() succeeds for interned string: 598ms
TIMER str1.equals(str2) = fails (without intern): 38ms
TIMER str1 == str2 fails: 2ms
TIMER str1 == str2.intern() fails: 575ms
TIMER OsmPrimitive#get(String) with tag/node ratio 0.05: 19ms
TIMER OsmPrimitive#get(String) with tag/node ratio 0.3: 16ms
TIMER OsmPrimitive#get(String) with tag/node ratio 3.0: 9ms
TIMER OsmPrimitive#get(String) with tag/node ratio 20.0: 26ms
TIMER OsmPrimitive#get(String) with tag/node ratio 200.0: 37ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 0.05: 18ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 0.3: 15ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 3.0: 16ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 20.0: 29ms
TIMER OsmPrimitive#put(String, String) with put/node ratio 200.0: 114ms
TIMER OsmPrimitive#getKeys().get(key) with tag/node ratio 0.05: 20ms
TIMER OsmPrimitive#getKeys().get(key) with tag/node ratio 0.3: 26ms
TIMER OsmPrimitive#getKeys().get(key) with tag/node ratio 3.0: 39ms
TIMER OsmPrimitive#getKeys().get(key) with tag/node ratio 20.0: 78ms
TIMER OsmPrimitive#getKeys().get(key) with tag/node ratio 200.0: 378ms
TIMER MapCSSStyleSource#loadStyleSource(...) for only has key rules: 288ms
TIMER 100000x MapCSSStyleSource#apply(...) for only has key rules: 2794ms
TIMER MapCSSStyleSource#loadStyleSource(...) for regular expressions: 167ms
TIMER 100000x MapCSSStyleSource#apply(...) for regular expressions: 27313ms
TIMER MapCSSStyleSource#loadStyleSource(...) for is true: 53ms
TIMER 100000x MapCSSStyleSource#apply(...) for is true: 1885ms
TIMER MapCSSStyleSource#loadStyleSource(...) for only key=value rules: 110ms
TIMER 100000x MapCSSStyleSource#apply(...) for only key=value rules: 178ms

Why are [key] rules slower to apply than [key=value] rules?

comment:6 by bastiK, 9 years ago

Results for automated unit tests can be seen here: https://josm.openstreetmap.de/jenkins/job/JOSM/jdk=JDK8/

comment:7 by Don-vip, 9 years ago

Milestone: 15.0715.08

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.