FrancescoCastaldi opened a new pull request, #46080: URL: https://github.com/apache/superset/pull/46080
### SUMMARY Fixes #45885 #### Problem With Ant Design v6 theme variables, every DOM element inherits ~440 `--ant-*` custom CSS properties. When exporting dashboards or large charts (e.g. Pivot Tables with 10,000+ cells / 30,000 DOM elements), `dom-to-image-more` iterates over all computed styles and copies every property inline onto each cloned element. This creates millions of inline style assignments, blowing browser renderer memory past 6-8 GB and crashing the Chrome tab (`SIGILL` / Out of Memory). #### Solution Configure `filterStyles` in `domToImage` options to omit custom CSS properties starting with `--`: - CSS custom variables are already evaluated into their corresponding computed properties (`color`, `background-color`, `font-size`, `margin`, etc.) on rendered DOM nodes. - Skipping `--*` custom properties prevents unnecessary style cloning while preserving 100% of the rendered visual appearance. - Reduces export memory footprint by over 80% and eliminates renderer crashes on large pivot tables and tabular views. - Added comprehensive unit tests in `downloadAsImage.test.ts`. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A (visual appearance is identical; memory consumption drops from 8+ GB crash to normal operating bounds). ### TESTING INSTRUCTIONS 1. Create a large Pivot Table (e.g., 10,000+ cells on `birth_names` example dataset). 2. Trigger "Download as image" (JPEG or PNG). 3. Verify that the image downloads successfully without high memory usage or tab freezing. ### ADDITIONAL INFORMATION - [x] Has associated issue: #45885 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in SIP-59) - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
