In order to debug this problem effectively you first need to understand
the fundamental differences in the architecture of the rewrite branch.
In the old "main" branch redrawing was always done in the Android GUI
thread. To improve the responsiveness and make better use of modern
multi core CPUs this has been moved to a separate thread in the rewrite
branch. The GUI thread now only draws a single bitmap, no matter how
many layers the application has. The time needed for this is constant.
Besides the physical hardware and the Android version of your device
there are several parameters which influence the FPS ratio and the
general drawing performance. The size of the actual drawn canvas is one
of them. Currently the default overdraw factor is 1.5 which means that
2.25 the visible area of the screen is painted. You should try out
different values and measure the effect on your application:
mapView.getModel().frameBufferModel.setOverdrawFactor(double);
To avoid too fast redrawing there is a built-in throttle in the
LayerManager which limits the frame rate of the layer redrawing. So far
the frame time was set to 50 ms which equals a maximum of 20 FPS. I just
lowered that value to 30 ms which means 33 FPS max. Another important
parameter is the priority of the LayerManager thread.
Conclusion: fast layer redrawing is really crucial and complex. You
should use the method profiling of the DDMS (traceview) to debug your
application and detect potential performance bottlenecks. If you can
share your code with us (only a minimum working example please) I might
be able to give further hints for optimization.
Greetings,
Thilo
> --
> You received this message because you are subscribed to the Google
> Groups "mapsforge-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
mapsforge-de...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>