RadMap performance in app with high memory usage

2 posts, 0 answers
  1. Shrinand
    Shrinand avatar
    8 posts
    Member since:
    Oct 2010

    Posted 26 Mar 2015 Link to this post

    Hi guys,

    My application typically uses high amount of memory, up to 1GB in some intensive cases. My machine has 12GB memory so no problem. In intensive cases, RadMap fails to respond after panning/zooming a couple of times. When profiled, the bottleneck is in Telerik.Windows.Controls.Map.TileSource.CreateBitmap(). I tried to used caching but not much improvement. Any advice?

    This is some code for mockup

    <Window x:Class="RadMapPerf.MainWindow"
            Title="MainWindow" Height="600" Width="800">
            <telerik:RadMap x:Name="RadMap" Center="38.8993487,-77.0145665" UseDefaultLayout="False" ZoomLevel="7">
                    <telerik:OpenStreetMapProvider IsTileCachingEnabled="True"/>
    public partial class MainWindow : Window
            private readonly List<string> _memory = new List<string>();
            public MainWindow()
                // fake memory usage
                for (var i = 0; i < 100000000; i++)
  2. Petar Mladenov
    Petar Mladenov avatar
    2882 posts

    Posted 31 Mar 2015 Link to this post

    Hello Shrinand,

    You can try to increase the default Cache Size which is 10 * 1024 * 1024 bytes. A possible way to achieve this is to inherit from OpenStreetMapProvider like so:
    public class CustomOpenStreetProvider : OpenStreetMapProvider
        public CustomOpenStreetProvider() : base()
            if (this.MapSources.Count == 0)
            var tiledSource = this.MapSources.ToList()[0].Value as TiledMapSource;
            if (tiledSource != null)
                tiledSource.IsTileCachingEnabled = true;
                tiledSource.SetTileCacheSize(100 * 1024 * 1024);

    Please let us know if this has a positive effect in your environment.

    Petar Mladenov

    See What's Next in App Development. Register for TelerikNEXT.

  3. DevCraft banner
Back to Top