I am working with .NET SDK v100.9 on a project. There is a visualization performance drop on a basic application when app enters fullscreen. The app loads, as a basemap, only a url from ArcGIS Server 10.7.1. The url loaded is a WMTS that has been cached with this levels: 4M, 2M, 1M, 500K, 250K, 100K, 64K, 32K, 16K, 8K, 4K, 2K and 1K.
Navigation performance in fullscreen (resolution 3840x2160) starts to be very poor, performing fast mouse wheel moves (zoomin/zooout). The performace is good if only Pan is doing.
If I resize the app window decreasing it, the navigation performance seems to be better as the window size is getting smaller.
I tried creating several services with different tile sizes from 128x128 to 1024x1024. 256x256 seems to be the better option.
During the navigation in fullscreen ArcGIS Server machine memory and cpu are quite low. Application process in the windows client machine reaches 25% of CPU, when the tiles are not rendering properly fast.
Are there any tunings I can make to adjust the performance?
App code attached
BR
Borja
Could you describe what you mean by performance? Is it low framerate, high CPU load, high GPU load, time for layers to load / data to download etc?
Also make sure the debugger isn't attached, as that is known that Visual Studio creates a significant performance issue while being attached to the app.
Hi Morten,
Thank you for your response.
I mean low framerate. During moving the mouse wheel to zoomin/out rapidly, some frames of the app keep freeze/distorted and are not rendered fine until 3 or 4 seconds. Screenshot attached.
I deploy the application with the Realease configuration mode active in Visual Studio.
BR
Borja
Hi again,
Also, I've noticed that when some of the tiles are stuck, the garbage collector has been launched several times in a very short period of time.
And at the same time, this messages in the ouput console
Exception thrown: 'System.ObjectDisposedException' in System.dll
Exception thrown: 'System.ObjectDisposedException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.WebException' in System.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in mscorlib.dll
Exception thrown: 'System.ObjectDisposedException' in System.dll
Exception thrown: 'System.Net.Http.HttpRequestException' in mscorlib.dll
Exception thrown: 'System.ObjectDisposedException' in System.dll
BR
Hi,
From the debug menu please can you try Start Without Debugging (or press Ctrl + F5)?
Thanks
Mike
Thanks for your response Michael. Yes I've tested that way, also executing the bin\Release\App.exe with Visual Studio closed.
I've founded a similar post but It seems that in 100.9 the performance problem persists.
ArcGIS Runtime 100.4 draws basemap really slow when zooming with the mouse wheel
Also, I tried to configure GC without any success.
GC.TryStartNoGCRegion(2097152, true)
App.config
<runtime>
<gcServer enabled="false" />
</runtime>
Best Regards.
Borja
Hi,
Are you seeing poor performance with the WmtsLayer (`URL_WMTS`) or the ArcGISTiledLayer (`URL_REST`).
If it is the WmtsLayer, please can you share as much of the URL as possible - with some servers such as GeoServer, you may not be pulling from the cache depending on your URL pattern.
Thanks
Mike
Hi,
One suggestion you could try... ArcGIS Runtime SDK for .NET uses a default value of 6 for the maximum number of concurrent http connections *or* it will honor the value set by the application code. You can try increasing the value to find the appropriate level for you scenario. For reference, web browsers have varying limits but most appear to use a maximum of 6 connections per server/host and 10-20 maximum connections overall.
The value can be set via the DefaultConnectionLimit property on the static ServicePointManager class in the System.Net namespace (ServicePointManager.DefaultConnectionLimit Property (System.Net) | Microsoft Docs).
For example:
ServicePointManager.DefaultConnectionLimit = 10;
*Note* this call must be made before any underlying connections are created therefore implement this in application initialization logic such as App.Xaml.cs.
Thanks
Mike
Hello,
One more thing to try could be to set the PreferredImageFormat on the WMTSLayer and request tiles in either JPG/JPEG or PNG. Here is some information about the different TileFormats and How to create a cached image service in ArcGIS Enterprise. Maybe this will help with the performance.
Cheers,
Adi