ThinkGeo.com    |     Documentation    |     Premium Support

V10 to V12 - slowdown on pan/zoom in for inmemoryfeaturelayer

Greetings!

We noticed that when upgrading from V10 to V12, the time necessary to zoom in on our InMemoryFeatureLayers with features has increased significantly. Garbage collection is being hit repeatedly on each zoom. Is there a recommended way for generating layers w/ features that’s new for V12?

We usually read from a personal geodatabase, creating each feature using WellKnownText.

for each feature -->
feature = new Feature(wellKnownText,Guid.NewGuid().ToString(),columnValues);
layer.InternalFeatures.Add(feature);

layer.BuildIndex()
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
layer.DrawingQuality = DrawingQuality.HighSpeed;

Then add to overlay, add to map.

Does it make a difference using well known binary vs text? Is a different layer type more appropriate?

Thanks.

Thanks Fred,
Looks like you load your data to the InMemoryFeatureLayers. I recommend use the shape file. You can create the shape feature layer and put all you feature to the shape layer and save it with the index to the file system. Then you can load these features from shape layer directly. This way you don’t need build the index after load the shape file. The index already built when you save the shape file. And the map only load the feature which need render in the current view. You can find the shape layer sample

Or you could use SQLite/Postgres layer if your feature will change very often. You can find more sample here.

The InMemoryFeatureLayer will handle the layer which only have few records. And it will load all feature in to memory.

Thanks

Frank

Thanks for the reply - those examples were useful and ended up giving a small boost in performance.

We figured out that our biggest slowdown was elsewhere (how we were drawing custom lat/lon lines in the graticule layer), and fixed that. Thanks.

Thanks Fred,
Good to know it fixed. Go ahead let us know if you have any more question.

Thanks

Frank

@Fred_Thomas
Can you share and explain what you did that boost performance?

Hey @Mahdi_Rastegari,

Can you describe what performance issues you are facing?

Thanks,
Kyle