-
Notifications
You must be signed in to change notification settings - Fork 2
Performance comparison
One of the main goals of this project is to improve the render times.
The GeometryGenerationPerformanceTest runs several scenarios through the OpenGL and Java2D renderer. It also generates a reference image for both results.
The frame limit is disabled for those tests. Normally, the OpenGL renderer limits the number of primitives generated per frame to increase the response time to the first draw.
We draw 100,000 random test nodes as a triangle each. This tests how good the new algorithm handles simple, small geometries. Tested using 4 OpenGL threads and without asynchronous generation (between drawing the two frames).
Java2D | OpenGL | |
---|---|---|
first draw | 1778ms | 479ms |
second draw | 1696ms | 97ms |
The draw time for the first frame was reduced to 27%, the time for the second frame to 6%. Especially the improved drawing time for subsequent frames makes JOSM much more usable.
This is a more challenging example for OpenGL, since all octagons need to be converted to triangles before drawing them.
Java2D | OpenGL | |
---|---|---|
first draw | 6141ms | 1452ms |
second draw | 5210ms | 175ms |
Time for the second draw was reduced to 3,3% (factor: 30)
Java2D | OpenGL | |
---|---|---|
first draw | 3250ms | 990ms |
second draw | 3041ms | 33ms |
It is difficult to compare the real performance, since OpenGL has a different drawing strategy (paint as soon as possible, even if parts are missing) than Java2D (repaint everything). When running josm, we can still measure some times that relate to how responsive the map view feels for the user.
Tested was a field scene with several ways, a few labels and some landuse areas. The same line/node was used for both tests.
Java2D | OpenGL | |
---|---|---|
first data on screen | 104ms | 315ms |
first full draw | 104ms | 315ms |
move map view a bit | 42ms | 6ms |
hover one line | 49ms | 21ms |
select one line | 50ms | 20ms |
select everything | 101ms | (65 + 55 + 86)ms = 206ms |
An urban area with lots of buildings, some streets.
Java2D | OpenGL | |
---|---|---|
first data on screen | 856ms | 458ms |
first full draw | 856ms | (458 + 100 + 41 + 43 + 36 + 74 + 51)ms = 803ms |
move map view a bit | 106ms | 14ms |
hover one line | 98ms | 133ms |
hover one node | 109ms | 24ms |
select one line | 95ms | 114ms |
select everything | 138ms | (71 + 68)ms = 139ms |
Part of a city with lots of tagged shops, different kinds of geometries and more difficult buildings (multipolyons, ...)
Java2D | OpenGL | |
---|---|---|
first data on screen | 659ms | 383ms |
first full draw | 659ms | (383 + 66 + 84 + 65 + 74 + 101 + 54 + 74 + 47 + 67 + 101 + 105 + 161 + 99 + 84 + 165 + 158 + 322)ms = 2210ms |
move map view a bit | 453ms | 64ms |
hover one line | 335ms | 80ms |
hover one node | 323ms | 73ms |
select one line | 326ms | 68ms |
select everything | 452ms | (133 + 876 + 181 + 161 + 102 + 111 + 96 + 144 + 278 + 358)ms = 2440ms |