Hi
When creating the FeatureLayer, esri runtime begins to consume a very large amount of memory, up to over 7GB
com.esri.arcgisruntime:arcgis-android:100.15.5
Sample code
String url = "https://mapymalopolski.pl/res/ims-mz/maps/publ6946/FeatureServer/0";
ServiceFeatureTable serviceFeatureTable = new ServiceFeatureTable(url);
FeatureLayer featureLayer = new FeatureLayer(serviceFeatureTable);
String renderer = "{\"symbol\":{\"symbol\":{\"symbolLayers\":[{\"capStyle\":\"Round\",\"color\":[0,185,241,255],\"colorLocked\":false,\"effects\":[{\"method\":\"Rounded\",\"offset\":0,\"option\":\"Fast\",\"type\":\"CIMGeometricEffectOffset\"}],\"enable\":true,\"joinStyle\":\"Round\",\"lineStyle3D\":\"Strip\",\"miterLimit\":10,\"type\":\"CIMSolidStroke\",\"width\":1.5},{\"colorLocked\":false,\"enable\":true,\"lineSymbol\":{\"symbolLayers\":[{\"capStyle\":\"Round\",\"color\":[0,185,241,128],\"colorLocked\":false,\"effects\":[{\"method\":\"Rounded\",\"offset\":0,\"option\":\"Fast\",\"type\":\"CIMGeometricEffectOffset\"}],\"enable\":true,\"joinStyle\":\"Round\",\"lineStyle3D\":\"Strip\",\"miterLimit\":10,\"type\":\"CIMSolidStroke\",\"width\":1.5}],\"type\":\"CIMLineSymbol\"},\"offsetX\":0,\"offsetY\":0,\"rotation\":45,\"separation\":5,\"type\":\"CIMHatchFill\"}],\"type\":\"CIMPolygonSymbol\"},\"type\":\"CIMSymbolReference\"},\"type\":\"simple\"}";
featureLayer.setRenderer(Renderer.fromJson(renderer));
I forgot to add that esri throws oom errors:
Throwing OutOfMemoryError "Failed to allocate a 268435468 byte allocation with 100663296 free bytes and 280MB until OOM, target footprint 343806528, growth limit 536870912" (VmSize 72136228 kB)
Throwing OutOfMemoryError "Failed to allocate a 536870924 byte allocation with 100663296 free bytes and 153MB until OOM, target footprint 476438488, growth limit 536870912" (VmSize 72062864 kB)
Throwing OutOfMemoryError "Failed to allocate a 536870928 byte allocation with 100663296 free bytes and 153MB until OOM, target footprint 476467816, growth limit 536870912" (VmSize 71917968 kB)
Hi,
I have tried your service and applied your renderer in one of the 100.15.5 samples and see that memory stayed around 400-600MB as I pan and interact with the map with above provided feature service. I also tried the same in 200.x version samples and the behavior was same.
Is there potentially something else happening in your app that is causing the memory spike? Or am I missing any other repro steps needed?
Thanks
Rama
Hi,
Continuing the thread from user RafałKaczmarczyk:
Additionally, in the mapping application, there was a VT service connected, which had a large extent.
„{
"name" : "vtpk",
"type" : "indexedVector",
"tileMap" : "tilemap",
"defaultStyles" : "resources/styles",
"tiles" : [ "tile/{z}/{y}/{x}.pbf" ],
"initialExtent" : {
"xmin" : -2543559.0253459355,
"ymin" : -3006844.0137124225,
"xmax" : 7124446.885606469,
"ymax" : 1.164659862890002E7,
"spatialReference" : {
"wkid" : 102100,
"latestWkid" : 102100
}
},
Link to the service: https://mapymalopolski.pl/res/ims-cache/maps/VTileGraniceAdministracyjne_Flat2952/tile/vtpk/VectorTi...
Please verify the RAM usage, especially with the indicated above VT service.