Severe Performance Problem When Changing Zoom Levels?

6 posts, 0 answers
  1. rui
    rui avatar
    2 posts
    Member since:
    May 2011

    Posted 22 Dec 2011 Link to this post

    Hello everyone,

    I'm having some trouble with the WPF Map Control. On my application I'm generating about 2636 polygons (triangles) and attaching them to the Information Layer.

    Each MapPolygon is being created like so: 

    var polygon=New MapPolygon
                     {
                   Fill = currentStyle.FillColor,
                   Stroke = currentStyle.Stroke,
                   StrokeThickness = currentStyle.Thickness,
                   Opacity = currentStyle.Opacity,
                   Points = new LocationCollection()
                                             {
                                             new Location(point.Y1, point.X1),
                                             new Location(point.Y2, point.X2),
                                             new Location(point.Y3, point.X3)
                                              }
                  };

    This operation works fine and my triangles are properly generated on the map. Pan operations are fluid and without trouble, but zooming operations (in and out) raise severe performance issues, from enourmous memory/processor consumption to a sort of "delay" between the time that I issue the zoom order and the time the order gets carried out by the map.

    This problem only occurs with >1000 polygons on the map, regardless of type (rectangles, triangles, etc.).

    So, I would like your help on this. First I must ask if there is any known performance limitation/cap related with this matter (gernerating polygons on the map)? If not, can you tell me what might be the cause for this trouble?
    And secondly, what avaible workarounds are there that won't imply using a dynamic layer over the map to manage the objects?

    Thanks in advance for the help and for the time taken with this matter!
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 23 Dec 2011 Link to this post

    Hi,

    The rendering performance can be insufficient when you show a lot of shapes. I wouldn't recommend to use more than 1000 objects like MapPolygon on the information layer. If you will not use the dynamic layer, then you can improve performance of zooming by disabling the spring animations feature only.
    <telerik:RadMap
        x:Name="radMap"
        UseSpringAnimations="False">
    </telerik:RadMap>

    Kind regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. rui
    rui avatar
    2 posts
    Member since:
    May 2011

    Posted 04 Jan 2012 Link to this post

    Hi,

    Thanks for the help. Disabling the spring animation over the radMap control helped to improve performance, however the end result is still a bit far from "fluid" and smooth zoom in/zoom out.

    So, the next step would be to use a dynamic layer?

    Thanks and best regards.
  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 09 Jan 2012 Link to this post

    Hi Rui,

    Yes, I would suggest you use Dynamic Layer for your project. Here is a link that contains two sample solutions that might be useful to you.

    Please take a look the Using Dynamic Layer topic of our documentation and the Items Virtualization example.

    Hope this helps.

    Regards,
    Petar Marchev
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  6. Steve
    Steve avatar
    4 posts
    Member since:
    Oct 2012

    Posted 18 Oct 2012 Link to this post

    Would a dedicated video card resolve or help this issue?  I assume the problem would be worse if the machine only had an onboard video card integrated in the motherboard?
  7. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 23 Oct 2012 Link to this post

    Hi Steve,

    We've made several tests on different hardware and it looks like a dedicated video card can speed up zooming.

    Kind regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready