Select to view content in your preferred language

Slow redraw when adding graphics

2792
6
06-26-2012 05:03 PM
FredSpataro
Frequent Contributor
Hi All:

I'm seeing really SLOW redraw/update performance.  I don't have much going in the map: a tiled base map, a few graphics layers.

In one scenario, two polygon graphics located at the map center are added to the first graphic layer.  These update each time the user pans. 
In the other scenario, simple point graphics are added to a second graphics layer where ever the user clicks on the map.

The graphics take quite a long time to draw...almost a full '10 Mississippi'.  I've tried removing the graphics and adding new ones, updating the geometry of the current graphics, etc... nothing seems to make this happen any faster. 

This is for a data collection app and if this is the best performance from the native SDK, it's not going to be suitable for my client. 

When the device is tethered to the computer and I can watch the NSLog output, I see my log "done" statement after the [myGraphicsLayer dataChanged] method.  Then I can can count at least to 5, sometimes 10 before the graphics draw.  Am I doing something wrong?   I'm pretty much following the exact code at the "Adding Graphic Features" section here: http://resources.arcgis.com/en/help/runtime-ios-sdk/concepts/index.html#/Managing_Graphic_features/0...

This is iOS 5.1 on iPAD 3 using SDK 2.2. 

Thanks for any suggestions
0 Kudos
6 Replies
NimeshJarecha
Esri Regular Contributor
Have you tried using the latest SDK v2.3? Do you see the same issue?

Regards,
Nimesh
0 Kudos
FredSpataro
Frequent Contributor
Thanks for the response...

Just tried SDK 2.3, good news/bad news:

Good:  redraw speed on the graphics is MUCH better... performance is what i'd expect. 
Bad:  the auto rotation of the map in mode: AGSGPSAutoPanModeCompassNavigation went from "silky smooth" to "choppy clunky".   

We took the graphics layers off the map and the auto rotation is silky smooth again. 

The app has two graphics layers:
1. The "distance circles"  (always two polygon graphics, simple outlines only)
2. The user click points (current test as 5 simple marker graphics, but users in the field may collect hunderds at a time)

The app also has the "sketch layer" turned on to display the current GPS track. 

We're pulling off each layer to see if it's a particular layer that's causing the issue.
0 Kudos
FredSpataro
Frequent Contributor
We added 2 graphics layers and the sketch layer to the GPS sample.  No circles, no gps track, just user clicks to add points to the first layer. Same results, as soon as you add graphics the auto-rotation gets choppy.
0 Kudos
DiveshGoyal
Esri Regular Contributor
I suspect what is happening is that the display pipeline is not able to keep pace with the constantly changing map rotation, especially because the iPad 3 retina display requires a lot of fine detail in the graphics.

As a workaround, can you try disabling the renderNativeResolution property on all the graphics layers and see if that makes things better? I have a feeling it might because the graphics layer will not try to draw in such great detail. You may see a slight degradation in the crispness of your graphics, but it may not be noticeable.

Please let us know.
And thank you for reporting this,  your feedback is very helpful.
0 Kudos
FredSpataro
Frequent Contributor
Divesh,

Thanks we'll give it a try and let you know.
0 Kudos
EvanKirkwood
Occasional Contributor
I suspect what is happening is that the display pipeline is not able to keep pace with the constantly changing map rotation, especially because the iPad 3 retina display requires a lot of fine detail in the graphics.

As a workaround, can you try disabling the renderNativeResolution property on all the graphics layers and see if that makes things better? I have a feeling it might because the graphics layer will not try to draw in such great detail. You may see a slight degradation in the crispness of your graphics, but it may not be noticeable.

Please let us know.
And thank you for reporting this,  your feedback is very helpful.


Had a similar problem with our app running on an iPad 3. The combination of updating to v2.3 of the SDK and setting the renderNativeResolution property to NO on all graphics layers resolved the issue for us - we're seeing much better performance, and significantly lower virtual memory usage when we profile the app using the VM Tracker in the Xcode Instruments tool.

Evan
0 Kudos