<?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 Any known issues with React Dev Tools causing memory leak with Esri Arcgis JS SDK? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-known-issues-with-react-dev-tools-causing/m-p/1552580#M85961</link>
    <description>&lt;P&gt;We accidentally found this while testing our product this week.&lt;/P&gt;&lt;P&gt;One of our developers happened to have React Dev Tools installed in his browser. We ran our application which rendered 4 maps in a browser tab:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_0-1729910686140.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118182i7DE5EAE91D9C833D/image-size/large?v=v2&amp;amp;px=999" role="button" title="JonathanTiu_0-1729910686140.png" alt="JonathanTiu_0-1729910686140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;He went to another browser tab then left for some time ...more than 10 minutes. Came back and flipped back to the browser tab with our 4 maps, we noticed maps started disappearing, almost as if unloaded like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_1-1729910782534.png" style="width: 708px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118183i76DC0B57D7DA355F/image-dimensions/708x290?v=v2" width="708" height="290" role="button" title="JonathanTiu_1-1729910782534.png" alt="JonathanTiu_1-1729910782534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attempting to interact with the 'disappeared' map caused all sorts of console errors like&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_2-1729910905938.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118184i03C7C202184F7953/image-size/large?v=v2&amp;amp;px=999" role="button" title="JonathanTiu_2-1729910905938.png" alt="JonathanTiu_2-1729910905938.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The map was essentially useless and we could not interact with it.&lt;/P&gt;&lt;P&gt;We then noticed the memory consumption had shot to 1.5GB and beyond.&lt;/P&gt;&lt;P&gt;We quickly grabbed a heap snapshot to look.&amp;nbsp; The most obvious thing that stood out was the sheer number of array buffers.&amp;nbsp; From previous memory analysis, i remember there is usually one of these per Map/MapView but here we saw upwards of 16 in that page with just 4 maps.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_3-1729911403178.png" style="width: 835px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118185iBD320EF7F995751B/image-dimensions/835x200?v=v2" width="835" height="200" role="button" title="JonathanTiu_3-1729911403178.png" alt="JonathanTiu_3-1729911403178.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i then noticed one of them had a stack referring to the react dev tools.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_4-1729911503250.png" style="width: 708px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118186i68E651E9A9D450C2/image-dimensions/708x347?v=v2" width="708" height="347" role="button" title="JonathanTiu_4-1729911503250.png" alt="JonathanTiu_4-1729911503250.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So on a hunch,&amp;nbsp;we uninstalled React Dev Tools and the problem completely disappeared!&lt;/P&gt;&lt;P&gt;We reran this scenario various times and noticed even while sitting on the browser tab, after a while, the memory consumption would start increasing even though we were not interacting with it at all.&lt;/P&gt;&lt;P&gt;I did google and it seems some people have accused the React Dev Tools of creating memory leaks.&lt;/P&gt;&lt;P&gt;Anyways i am bringing this up because i'm curious if Esri is aware of this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 26 Oct 2024 02:59:45 GMT</pubDate>
    <dc:creator>JonathanTiu</dc:creator>
    <dc:date>2024-10-26T02:59:45Z</dc:date>
    <item>
      <title>Any known issues with React Dev Tools causing memory leak with Esri Arcgis JS SDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-known-issues-with-react-dev-tools-causing/m-p/1552580#M85961</link>
      <description>&lt;P&gt;We accidentally found this while testing our product this week.&lt;/P&gt;&lt;P&gt;One of our developers happened to have React Dev Tools installed in his browser. We ran our application which rendered 4 maps in a browser tab:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_0-1729910686140.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118182i7DE5EAE91D9C833D/image-size/large?v=v2&amp;amp;px=999" role="button" title="JonathanTiu_0-1729910686140.png" alt="JonathanTiu_0-1729910686140.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;He went to another browser tab then left for some time ...more than 10 minutes. Came back and flipped back to the browser tab with our 4 maps, we noticed maps started disappearing, almost as if unloaded like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_1-1729910782534.png" style="width: 708px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118183i76DC0B57D7DA355F/image-dimensions/708x290?v=v2" width="708" height="290" role="button" title="JonathanTiu_1-1729910782534.png" alt="JonathanTiu_1-1729910782534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attempting to interact with the 'disappeared' map caused all sorts of console errors like&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_2-1729910905938.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118184i03C7C202184F7953/image-size/large?v=v2&amp;amp;px=999" role="button" title="JonathanTiu_2-1729910905938.png" alt="JonathanTiu_2-1729910905938.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The map was essentially useless and we could not interact with it.&lt;/P&gt;&lt;P&gt;We then noticed the memory consumption had shot to 1.5GB and beyond.&lt;/P&gt;&lt;P&gt;We quickly grabbed a heap snapshot to look.&amp;nbsp; The most obvious thing that stood out was the sheer number of array buffers.&amp;nbsp; From previous memory analysis, i remember there is usually one of these per Map/MapView but here we saw upwards of 16 in that page with just 4 maps.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_3-1729911403178.png" style="width: 835px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118185iBD320EF7F995751B/image-dimensions/835x200?v=v2" width="835" height="200" role="button" title="JonathanTiu_3-1729911403178.png" alt="JonathanTiu_3-1729911403178.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i then noticed one of them had a stack referring to the react dev tools.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JonathanTiu_4-1729911503250.png" style="width: 708px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118186i68E651E9A9D450C2/image-dimensions/708x347?v=v2" width="708" height="347" role="button" title="JonathanTiu_4-1729911503250.png" alt="JonathanTiu_4-1729911503250.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So on a hunch,&amp;nbsp;we uninstalled React Dev Tools and the problem completely disappeared!&lt;/P&gt;&lt;P&gt;We reran this scenario various times and noticed even while sitting on the browser tab, after a while, the memory consumption would start increasing even though we were not interacting with it at all.&lt;/P&gt;&lt;P&gt;I did google and it seems some people have accused the React Dev Tools of creating memory leaks.&lt;/P&gt;&lt;P&gt;Anyways i am bringing this up because i'm curious if Esri is aware of this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2024 02:59:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-known-issues-with-react-dev-tools-causing/m-p/1552580#M85961</guid>
      <dc:creator>JonathanTiu</dc:creator>
      <dc:date>2024-10-26T02:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Any known issues with React Dev Tools causing memory leak with Esri Arcgis JS SDK?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-known-issues-with-react-dev-tools-causing/m-p/1553395#M85992</link>
      <description>&lt;P&gt;Good catch, I've been following your posts around the JSArrayBufferData bloat. I do know simply having dev tools open adds memory overhead in all cases, but never correlated it with React Dev Tools specifically. I want to say this is only a problem when you've got dev tools open and it's especially pronounced if you're running a local build of your app, which unfortunately is typically the primary dev workflow. I don't think these would be present in a production build, but cannot say for sure.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 17:22:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/any-known-issues-with-react-dev-tools-causing/m-p/1553395#M85992</guid>
      <dc:creator>AddisonShaw</dc:creator>
      <dc:date>2024-10-29T17:22:02Z</dc:date>
    </item>
  </channel>
</rss>

