<?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: Hover interaction significantly slower on high-DPI / Retina displays — hitTest performance degrades with devicePixelRatio in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hover-interaction-significantly-slower-on-high-dpi/m-p/1702021#M88433</link>
    <description>&lt;P&gt;Here is a video of the running application. If I manually reduce the screen device pixel ratio (2 =&amp;gt; 1.4), I drastically improve the interaction snappiness.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this expected behaviour?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6395521564112w1114h540r111" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6395521564112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6395521564112w1114h540r111');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6395521564112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 14 May 2026 11:50:16 GMT</pubDate>
    <dc:creator>JonathanDawe_BAS</dc:creator>
    <dc:date>2026-05-14T11:50:16Z</dc:date>
    <item>
      <title>Hover interaction significantly slower on high-DPI / Retina displays — hitTest performance degrades with devicePixelRatio</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hover-interaction-significantly-slower-on-high-dpi/m-p/1702016#M88431</link>
      <description>&lt;P class=""&gt;Hi all,&lt;/P&gt;&lt;P class=""&gt;I've been building a web app using the ArcGIS Maps SDK for JavaScript (v5.x) that displays imagery footprints as polygons on a FeatureLayer using a polar stereographic projection (EPSG:3031). The core interaction is simple: &lt;U&gt;hover over a polygon and highlight it.&lt;/U&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;The problem&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;On a MacBook with a Retina display, the hover feels noticeably sluggish. There's a visible delay between moving the mouse and the highlight updating. When I switch to a standard (non-Retina) external monitor, the same app feels much more snappy and responsive.&lt;/P&gt;&lt;P class=""&gt;I've measured this by timing mapView.hitTest() calls with performance.now() across 100 samples:&lt;/P&gt;&lt;DIV class=""&gt;Display Device Pixel Ratio Avg hitTest p50 p95 &lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Retina (built-in)&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;58.96 ms&lt;/TD&gt;&lt;TD&gt;69 ms&lt;/TD&gt;&lt;TD&gt;108 ms&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;External (non-Retina)&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;30.03 ms&lt;/TD&gt;&lt;TD&gt;16.9 ms&lt;/TD&gt;&lt;TD&gt;80 ms&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;The hitTest on Retina is consistently around 2× slower, and that difference is very noticeable in practice. I've put together a video showing the issue occurring in a standalone HTML example — no framework, just ArcGIS and vanilla JS — with Chrome's device emulation toggling between DPI=1 and DPI=2&lt;/P&gt;&lt;P class=""&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6395511126112w982h540r444" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6395511126112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6395511126112w982h540r444');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6395511126112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Profiling in Chrome DevTools&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;To dig deeper I recorded Chrome Performance traces during identical hover patterns at emulated DPI settings:&lt;/P&gt;&lt;UL class=""&gt;&lt;LI&gt;On DPI=1, the Maps SDK's animation loop runs at a smooth 120 fps with no gaps.&lt;/LI&gt;&lt;LI&gt;On DPI=3, it runs at roughly 20 fps on average, with the main thread sitting idle for about 94% of the recording. The renderer isn't busy — it's just waiting.&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;The pattern is that after each highlight update renders, the SDK stops requesting new frames from the browser entirely. It only starts again once the next hitTest promise resolves. On DPI=1, that happens quickly enough that rendering stays continuous. On DPI=3, with hitTest taking over 60 ms, there are visible pauses of 100–140 ms between each highlight update — and that's what the user feels as lag.&lt;/P&gt;&lt;P class=""&gt;The bottom-up CPU profile shows no expensive JS during these gaps. The main thread is genuinely doing nothing. The work appears to happen inside the ArcGIS SDK's own rendering pipeline, not in application code.&lt;/P&gt;&lt;P class=""&gt;I'm not sure exactly what's happening inside the SDK at this point, but I wonder if it's related to how the WebGL canvas scales with devicePixelRatio — at DPI=2 that's 4× the pixel area compared to DPI=1, which could potentially be a factor in why hitTest takes longer?&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;What I'd actually prefer&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;For this use case of imagery footprints, I'd happily trade Retina sharpness for responsive hover interaction. Is there a supported way to cap the dpi used in the hittest somehow to speed up the checks?&lt;/P&gt;&lt;P class=""&gt;Has anyone else hit this? Any suggestions welcome.&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2026 11:13:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hover-interaction-significantly-slower-on-high-dpi/m-p/1702016#M88431</guid>
      <dc:creator>JonathanDawe_BAS</dc:creator>
      <dc:date>2026-05-14T11:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Hover interaction significantly slower on high-DPI / Retina displays — hitTest performance degrades with devicePixelRatio</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hover-interaction-significantly-slower-on-high-dpi/m-p/1702021#M88433</link>
      <description>&lt;P&gt;Here is a video of the running application. If I manually reduce the screen device pixel ratio (2 =&amp;gt; 1.4), I drastically improve the interaction snappiness.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this expected behaviour?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6395521564112w1114h540r453" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6395521564112" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6395521564112w1114h540r453');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6395521564112"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 May 2026 11:50:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hover-interaction-significantly-slower-on-high-dpi/m-p/1702021#M88433</guid>
      <dc:creator>JonathanDawe_BAS</dc:creator>
      <dc:date>2026-05-14T11:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hover interaction significantly slower on high-DPI / Retina displays — hitTest performance degrades with devicePixelRatio</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hover-interaction-significantly-slower-on-high-dpi/m-p/1702034#M88434</link>
      <description>&lt;P&gt;My current fix which feels like a massive hack is as follows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Caps reads of `window.devicePixelRatio`. ArcGIS WebGL hit-testing seems to scale with
// DPR; on high-DPI screens, the function calls become expensive enough to block new animation frames
// during hover or pan (causing noticeable UI jank).

const MAX_DEVICE_PIXEL_RATIO = 1.4;

const descriptor =
  Object.getOwnPropertyDescriptor(Window.prototype, 'devicePixelRatio') ??
  Object.getOwnPropertyDescriptor(window, 'devicePixelRatio');

if (descriptor?.get) {
  const nativeGet = descriptor.get.bind(window) as () =&amp;gt; number;

  Object.defineProperty(window, 'devicePixelRatio', {
    configurable: true,
    enumerable: descriptor.enumerable ?? true,
    get: (): number =&amp;gt; Math.min(MAX_DEVICE_PIXEL_RATIO, nativeGet()),
  });
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 May 2026 13:12:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hover-interaction-significantly-slower-on-high-dpi/m-p/1702034#M88434</guid>
      <dc:creator>JonathanDawe_BAS</dc:creator>
      <dc:date>2026-05-14T13:12:28Z</dc:date>
    </item>
  </channel>
</rss>

