<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Memory build on featureLayer.setDefinitionExpression in Map view in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1104688#M2468</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/362113"&gt;@KarthiSivalingam&lt;/a&gt;&amp;nbsp;you say it reached 1.3GB, but was it a stable 1.3Gb or was it still going up?&amp;nbsp; Are you able to reproduce the crash in your own environment?&lt;/P&gt;&lt;P&gt;Memory management of a Java application isn't like a C++ app where resources are freed up as soon as they are deallocated.&amp;nbsp; In a Java app, resources are only freed up when garbage collection happens.&amp;nbsp; This is something which is controlled by the JVM and cannot be predicted.&amp;nbsp; Garbage collection is an expensive operation, so the JVM may not run it if it feels that system resources are not running out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can get me the console output from the crash and any logs I can look at this.&amp;nbsp; When you say "crash", did the the JVM actually crash?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Oct 2021 10:13:56 GMT</pubDate>
    <dc:creator>MarkBaird</dc:creator>
    <dc:date>2021-10-05T10:13:56Z</dc:date>
    <item>
      <title>Memory build on featureLayer.setDefinitionExpression in Map view</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1102442#M2461</link>
      <description>&lt;H5&gt;Hi,&lt;/H5&gt;&lt;H5&gt;A FeatureLayer is created using ServiceFeatureTable&amp;nbsp; and added and on Map view. On some user flows&amp;nbsp; setting featurelayer definition expression using featureLayer.setDefinitionExpression(). It is observed that for every such API call the additional memory is consumed which is never released, leading to eventual crash of application.&amp;nbsp;&amp;nbsp;&lt;/H5&gt;&lt;P&gt;Environment:&lt;BR /&gt;OS : Windows 10&lt;BR /&gt;ArcGIS Runtime SDK 100.11.2 and ArcGIS Runtime SDK 100.12&lt;BR /&gt;JDK : Open JDK11.0.12+7&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Karthi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 06:39:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1102442#M2461</guid>
      <dc:creator>KarthiSivalingam</dc:creator>
      <dc:date>2021-09-28T06:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Memory build on featureLayer.setDefinitionExpression in Map view</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1103033#M2464</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/362113"&gt;@KarthiSivalingam&lt;/a&gt;&amp;nbsp;can you send me the console output you are getting when the application crashes?&amp;nbsp; It would help me to see the details of this.&lt;/P&gt;&lt;P&gt;I'm currently running a modified version of your app which is hitting that toggle button 4 times a second to see if I'm able reproduce the crash.&lt;/P&gt;&lt;P&gt;I've not managed to get it to crash yet (after 2 hours), but I'm seeing the memory usage of the JVM go up very slightly, but given the allocation and deallocation of resources happening in the background I'd expect this.&amp;nbsp; When resources are deallocated in Java, you won't see an immediate drop in memory usage; this is managed by the garbage collection in the JVM.&amp;nbsp; The JVM should free up resources eventually.&lt;/P&gt;&lt;P&gt;I've had a quick look at your code and I can't see any issues with what you are doing here.&lt;/P&gt;&lt;P&gt;Send me some more details of the crash and I'll look into this.&amp;nbsp; It certainly shouldn't be crashing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 12:53:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1103033#M2464</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2021-09-29T12:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Memory build on featureLayer.setDefinitionExpression in Map view</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1103102#M2466</link>
      <description>&lt;P&gt;Just an update on this, I've had the modified version of your app running for about 4 hours now and memory usage has been very stable at about 670mb and isn't going up (it crept up initially, but stabilised).&amp;nbsp; This app has been hitting the toggle button every 250ms for the entire time.&lt;/P&gt;&lt;P&gt;I'll leave it running for a bit longer, but to investigate this further I'm going to need some more information on crash you've seen.&amp;nbsp; Console output / crash dump and any details about how you've configured the JVM if you've made any changes from default.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 14:50:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1103102#M2466</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2021-09-29T14:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Memory build on featureLayer.setDefinitionExpression in Map view</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1104441#M2467</link>
      <description>&lt;P&gt;Hi , Thanks for checking it. In my environment, I have modified to hit the toggle every 250ms and kept it for an hour. Memory usage reached to 1.3GB. The crash is observed in my client's environment, I am trying to collect the crash dump from them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks ,&lt;/P&gt;&lt;P&gt;Karthi&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 16:08:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1104441#M2467</guid>
      <dc:creator>KarthiSivalingam</dc:creator>
      <dc:date>2021-10-04T16:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Memory build on featureLayer.setDefinitionExpression in Map view</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1104688#M2468</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/362113"&gt;@KarthiSivalingam&lt;/a&gt;&amp;nbsp;you say it reached 1.3GB, but was it a stable 1.3Gb or was it still going up?&amp;nbsp; Are you able to reproduce the crash in your own environment?&lt;/P&gt;&lt;P&gt;Memory management of a Java application isn't like a C++ app where resources are freed up as soon as they are deallocated.&amp;nbsp; In a Java app, resources are only freed up when garbage collection happens.&amp;nbsp; This is something which is controlled by the JVM and cannot be predicted.&amp;nbsp; Garbage collection is an expensive operation, so the JVM may not run it if it feels that system resources are not running out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you can get me the console output from the crash and any logs I can look at this.&amp;nbsp; When you say "crash", did the the JVM actually crash?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 10:13:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1104688#M2468</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2021-10-05T10:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Memory build on featureLayer.setDefinitionExpression in Map view</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1106354#M2470</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/48868"&gt;@MarkBaird&lt;/a&gt;&amp;nbsp;, I have re-ran it for longer time (around 6hrs) , Memory usage went up to 1.7GB and it was hovering around that. But it is not crashing in my environment. It was observed in my client's environment and I am trying to get the crash log from them. I will share it once received.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks ,&lt;/P&gt;&lt;P&gt;Karthi&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 09:53:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/memory-build-on-featurelayer/m-p/1106354#M2470</guid>
      <dc:creator>KarthiSivalingam</dc:creator>
      <dc:date>2021-10-11T09:53:36Z</dc:date>
    </item>
  </channel>
</rss>

