Modify ↓
#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.
Attachments (4)
Change History (11)
by , 10 years ago
Attachment: | 0001-Added-new-performance-test-for-OsmPrimitive-tag-hand.patch added |
---|
by , 10 years ago
Attachment: | 0002-Added-a-new-MapCSS-performance-test-for-the-rule-ind.patch added |
---|
by , 10 years ago
Attachment: | 0003-Added-count-of-apply-calls-to-output.patch added |
---|
by , 10 years ago
Attachment: | 0004-Reduced-the-number-of-MapCSSStyleSourceFilterTest-ru.patch added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Component: | Core → Core mappaint |
---|---|
Keywords: | gsoc added |
comment:3 by , 10 years ago
Milestone: | → 15.07 |
---|
comment:5 by , 10 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 , 10 years ago
Results for automated unit tests can be seen here: https://josm.openstreetmap.de/jenkins/job/JOSM/jdk=JDK8/
Note:
See TracTickets
for help on using tickets.
Patch 0004 is optional. You can add if if you think that the test is running too long.