We have issues with our application about performance and stability. For the mapping part, I've reproduce a sample code to perform stress-test, and identified following issues.
my project context :
Java8u40, ArcGIS Runtime 10.2.3, Application JavaFX, JMap is displayed in a JavaFx SwingNode, RxJava for reactive programming. Running on JRE 32bits. PC is Windows 7 Pro SP1, OS 64 bits, RAM 16 Go, Processor Intel Code CPU @ 3,40 Ghz.
my sample code :
1 JavaFx Stage with 1 button and 1 JMap (in a SwingNode). Basemap is a WMS (through MapServer) World map in Spatial Reference WGS 84. When Map is Ready, you can click on the "START POC" button to :
- create 10,000 polygons (ellipsis of 50 segments) on 1 Dynamic GraphicsLayer,
- create 10,000 points (center of each ellipsis) on 1 another Dynamic GraphicsLayer
- Then an update Cycle is started to perform every 30 seconds :
- move 2,000 polygons,
- move 2,000 points.
[sample code / project is attached to this post]
my results (log files are attached) on "START" button :
- Case 1: with JVM params -Xms256m -Xmx512m : program crash after 4h20min (after update iteration #530) with java.lang.OutOfMemory + EXCEPTION_ACCESS_VIOLATION + "The crash happened outside the Java Virtual Machine in native code."
- Case 2: with JVM params -Xms256m -Xmx800m : program crash with same reason, but after 1h15min (update iteration #150)
- Case 3: with JVM params -Xms1024m -Xmx1024m : program crash at the beginning with following Exception : Exception in Thread "AWT-EventQueue-0" java.lang.Exception: Buffer_loader_cache: map_buffer ERROR, cannot create staging resource !
- Case 4: with JVM params -Xms1000m -Xmx1000m : program crash at the beginning with following Exception : Exception in Thread "AWT-EventQueue-0" java.lang.Exception: Failed to resize vertex buffer !
in method ...JMap.nativeDrawMapDirectToBuffer...
- Case 5: upgrade to ArcGIS Runtime 10.2.4, with JVM params -Xms256m -Xmx 512m : program crash when trying to draw the polygons for the first time, with same fatal error Exception.
It surprised me that increasing max heap size of JVM get my program crashing faster... I was also not expecting that upgrading in ArcGIS Runtime 10.2.4 not improve the program.
Could anyone provide me with some explanations for these issues ? are there known limitations to ArcGIS Runtime with GraphicsLayer that explain these results ? any solutions ?