fix(deckgl-contour): prevent WebGL freeze by clamping and auto-scaling cellSize#37244
fix(deckgl-contour): prevent WebGL freeze by clamping and auto-scaling cellSize#37244rusackas merged 10 commits intoapache:masterfrom
Conversation
|
CodeAnt AI is reviewing your PR. Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Code Review Agent Run #029ca1Actionable Suggestions - 0Additional Suggestions - 2
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
CodeAnt AI finished reviewing your PR. |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @DamianPendrak @rusackas |
Code Review Agent Run #bfcdbfActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
CodeAnt AI Incremental review completed. |
|
All CI checks are now passing |
Code Review Agent Run #87df25Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
There was a problem hiding this comment.
Pull request overview
This PR adds safety guards to prevent WebGL freezes and crashes in Deck.gl Contour charts when extremely small cellSize values are used. The fix introduces validation, clamping, and auto-scaling logic to ensure grid cell counts remain within safe limits.
Changes:
- Added cellSize validation with safe min/max bounds (10-5000)
- Implemented auto-scaling when estimated grid cells exceed 1 million
- Added warning logging when auto-adjustment occurs
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/Contour.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/Contour.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/Contour.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/Contour.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
The tests would be great here. I requested the Copilot review - @YousufFFFF do you think there is something to improve from the suggestions?
|
Thanks @DamianPendrak ! I’ve reviewed the Copilot suggestions. I’ll incorporate the safety-related ones (explicit viewport dimension checks, clamping after auto-scaling, and clearer naming) |
|
CodeAnt AI is running Incremental review Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
I’ve applied the safety-related Copilot suggestions (explicit viewport checks, post-auto-scale clamping, and clearer naming). |
|
CodeAnt AI Incremental review completed. |
Code Review Agent Run #620d8fActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Code Review Agent Run #015b81Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
Hey @DamianPendrak ! |
superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Contour/index.ts
Outdated
Show resolved
Hide resolved
Code Review Agent Run #cf90a7Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
DamianPendrak
left a comment
There was a problem hiding this comment.
Thank you @YousufFFFF! LGTM
|
Thank you for the review, Damian! Much appreciated. |
Summary
Fixes #36838
This PR prevents Deck.gl Contour charts from freezing or crashing the browser/WebGL when extremely small
cellSizevalues are used.It introduces safety guards that:
cellSizeto a safe min/max rangecellSizewhen the estimated grid size becomes dangerously largeProblem
Very small
cellSizevalues can generate millions of grid cells, which causes:Solution
We now:
cellSizebetween safe min/max boundscellSizeif the grid becomes too largeThis keeps the chart responsive and prevents GPU crashes.
After
localhost_8088_explore__viz_type.deck_contour.datasource.3__table.-.Google.Chrome.2026-01-19.14-45-37.mp4
Behavior Changes
cellSizevaluesTesting
cellSize