[josm-dev] Mappaint performance analysis ...
Ulf Lamping
ulf.lamping at googlemail.com
Sat Jan 31 17:35:57 GMT 2009
Frederik Ramm schrieb:
> Hi,
>
> Ulf Lamping wrote:
>> 4) 4,1s (without icons -> ~ 100ms)
>> 5) 1,5s (without using strokes -> ~2600ms)
>>
>> Disabling nr. 5 (which means only 1 pixel width, no dashed lines, ...)
>> has - by far - the biggest performance impact!
>
> Told you so ;-)
Well, there were a lot of rumours "JAVA is too slow", "area filling is
slow", "strokes are slow", ...
But unless you really measure it, this is all just poor guesswork :-)
> We definitely need to keep some kind of "wireframe mode" that makes use
> of this. However It would be great if we could create wireframe mode as
> a mappaint style. I believe that currently even if the style requests a
> simple 1 pixel non-dashed line, mappaint will create a stroke object and
> incur the above speed penalty, right?
In the preferences you can set mappaint.strokes to a very high value
(say 500000), so the strokes will only be used if the map scaler (the
one at the top left of the map) is larger than this value. In effect
this is what you're asking for.
I don't see a reason why this can't also be integrated into the
elemstyles.xml file somehow. Basically that preferences can also be read
from the elemstyles.xml file. Doing this will effectively prevent the
"speed penalty" as you call it ;-)
So we can have a "very fast and simple wireframe" style easily that way.
BTW: the map speed is largely depending on the amount of stuff visible
on the screen.
Personally I have set this mappaint.strokes value to 500 (Meters). So if
I'm looking close I get all the details. If I zoom out enough, the
stroke (and other) details disappear making the map much faster.
Idea behind this: Show the level of detail depending on the current zoom
level. Serves myself very well the last weeks I tried it.
> Now if mappaint could be improved to recognize this condition and drop
> the stroke creation, then the super-fast wireframe mode could be used
> from within the mappaint mechanism, right?
Yes, as described above.
What we also need is a way to switch between different styles through
the menu. Don't know if that's already possible with the current menu
action implementation.
Regards, ULFL
P.S: I've experimented a bit with a map style dedicated on maxspeed to
get some practice for maps showing specialised interest. Looking at it,
I quickly realized where in Nürnberg the maxspeed tags are missing :-)
More information about the josm-dev
mailing list