Performance issue with 2000+ MapLines

4 posts, 0 answers
  1. Ernstjan
    Ernstjan avatar
    8 posts
    Member since:
    Nov 2010

    Posted 25 Feb 2011 Link to this post

    Hi All,

    I'm want to use the RadMap control to display around 2000 lines on the map.

    In pseudo code I do the following : (from and to contains the latitude and longitudes, the Arc object is the 'line' in my database)

    foreach (Arc arc in arcs)
    {
                        
                        MapLine line = new MapLine()
                        {
                            Point1 = new Location(from[1], from[0]),
                            Point2 = new Location(to[1], to[0]),
                            Stroke = new SolidColorBrush(Colors.Red),
                            StrokeThickness = 2
                        };
                       
                        this.InformationLayer.Items.Add(line);
    }

    When I add more than about 200 MapLines, the performance drops dramatically. Is there anything I can do to increase this?

    Help would be very appreciated!

    Thanks
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 02 Mar 2011 Link to this post

    Hello Ernstjan,

    The Silverlight rendering speed depends on the common productivity of the PC (CPU, video card). More elements visible at the same time decrease productivity. If you need not  to have all 2000 lines visible at the same time and you can granulate your surface to decreese the number of the visible lines, then you can try to use DynamicLayer:

    http://demos.telerik.com/silverlight/#Map/DynamicLayer

    I've tested RadMap with 2000 lines in it and it doesn't seems too slow actually. The speed of panning is OK, zooming is a bit slow, but not dramatically.

    Kind regards,
    Andrey Murzov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
  4. Ernstjan
    Ernstjan avatar
    8 posts
    Member since:
    Nov 2010

    Posted 02 Mar 2011 Link to this post

    Hi Andrew,

    Thanks for you answer. In this case I need to display all the objects, so the DynamicLayer is not really an option for me..

    I tried with 2000 objects as well, and performance is so-so.. I expected better performance to be honest..
    When I add 8000 pinpoint (I have 2000 lines and 8000 pinpoints, I use it to show a railroad map of France) performance is not acceptable, but maybe I'm asking too much? Or there are better solutions to accomplish my needs?

    I tested everything on a brand new computer with good specs (Win 7 64bits, core i7, 8GB RAM, NVIDIA GeForce GT 330M), so I think that cannot be the problem?

    Thanks again.
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 04 Mar 2011 Link to this post

    Hello Ernstjan,

    The 2000 lines and 8000 of the pinpoints is definitely too much to show at the same time. There is not solution for this scenario which could be used with map lines and pinpoints. 

    But it seems to me that this task can be implemented using DynamicLayer. The DynamicLayer allows changing of the detalization level depends on the zoom level. If you will show all 8000 pin points at zoom level 1, then they will cover a whole area of the France and you even will not see a map behind the lines and pin points. So you can show just a few of them for level 1. When zoom level is increased you can show more details and so on. But when you increase zoom level the only part of the map is visible in the view port (not whole France area) and as result only part of lines and pushpins will be visible in view port in the moment. So the DynamicLayer will work in this case.

    Regards,
    Andrey Murzov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top