YousufFFFF opened a new pull request, #37244:
URL: https://github.com/apache/superset/pull/37244

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### Summary
   
   Fixes #36838 
   
   This PR prevents Deck.gl Contour charts from freezing or crashing the 
browser/WebGL when extremely small `cellSize` values are used.
   
   It introduces safety guards that:
   
   - Clamp `cellSize` to a safe min/max range
   - Auto-scale `cellSize` when the estimated grid size becomes dangerously 
large
   - Prevents GPU buffer overflows and UI freezes
   - Keeps existing behavior for normal values
   
   ---
   
   ### Problem
   
   Very small `cellSize` values can generate millions of grid cells, which 
causes:
   
   - WebGL buffer allocation failures
   - UI freezes
   - Browser tab crashes
   - Console errors like:
   
   <img width="1920" height="1020" alt="image" 
src="https://github.com/user-attachments/assets/b4bcbb58-ed89-48ed-bdaf-2a7399e0d37f";
 />
   
   
   ---
   
   ### Solution
   
   We now:
   
   1. Clamp `cellSize` between safe min/max bounds
   2. Estimate the total grid cell count
   3. Auto-scale `cellSize` if the grid becomes too large
   4. Log a warning when auto-adjustment occurs
   
   This keeps the chart responsive and prevents GPU crashes.
   
   ---
   ### After 
   
   
https://github.com/user-attachments/assets/64bf9064-6a3c-49a4-ab6d-8082fae5a9e9
   
   ### Behavior Changes
   
   - No change for valid `cellSize` values
   - Extremely small values are safely adjusted instead of crashing the app
   
   ---
   
   ### Testing
   
   - Reproduced freeze/crash with very small `cellSize`
   - Verified UI no longer freezes
   - Verified chart renders correctly
   - Verified console errors are gone
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to