Topic: Performance decrease after upgrading from 3.7.8.1 to 3.8.0.1

Hello,

I know this is a very rough title, and I don't have many details. But ever since upgrading Online Maps my app stutters significantly for the first 5-10 seconds. This didn't happen in the previous version. I did create 2 builds with different versions of Online Maps as the only change. I wonder if anybody has observed something similar or if this is a known issue. I'm using Mapbox as map provider.

Regards,

Jürgen

2 (edited by negruj0w1tsch 2023-03-23 14:28:06)

Re: Performance decrease after upgrading from 3.7.8.1 to 3.8.0.1

It seems to be driven by a code that I invoke:

var mt = new OnlineMapsMapboxTile(tileToFetch.x, tileToFetch.y, zoom, map, false);
OnlineMapsTileManager.OnTileLoaded += OnTileLoaded;
OnlineMapsTileManager.StartDownloadTile(mt);

It's the StartDownloadTile call in particular that seems to be taking longer now. Note that the zoom in the above code is always set to 15 and I am roughly fetching 20-30 of those tiles when the app starts. I only invoke StartDownloadTile for 1 tile at a time and then again when the previous fetch has finished.
The profiler reveals the runtim of StartDownloadTile increases from 2-4ms to 30-40ms. More importantly it's allocating 2MB of GC.Alloc while previously it only allocated ~140kb per invokation.

3 (edited by negruj0w1tsch 2023-03-23 18:02:21)

Re: Performance decrease after upgrading from 3.7.8.1 to 3.8.0.1

I think I tracked it down to OnlineMapsMapboxTile.cs and the use of mapbox.mapbox-streets-v8 in the url pattern. When using the old mapbox.mapbox-streets-v7, the stuttering mentioned above does not appear for me. If you have any more insight into why that makes such a difference, that would be greatly appreciated.

Re: Performance decrease after upgrading from 3.7.8.1 to 3.8.0.1

Hello.

Please show a larger piece of code how you use this.
I will check it out.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Performance decrease after upgrading from 3.7.8.1 to 3.8.0.1

I stand corrected. I think the slowdown is caused mainly by my own processing that is invoked via the callback. It didn't show up in the inspector initially. Basically mapbox-streets-v8 returns a lot more POIs than v7 did, and that's having an impact on my processing times.