Skip to content

[charts] Use Map for string cache instead of object #17982

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2025

Conversation

bernardobelchior
Copy link
Member

Use Map for string cache instead of object. We get entry counting for free.

Also removed unstable_cleanupDOM since it wasn't doing anything.

Copy link

github-actions bot commented May 23, 2025

Thanks for adding a type label to the PR! 👍

@mui-bot
Copy link

mui-bot commented May 23, 2025

Deploy preview: https://deploy-preview-17982--material-ui-x.netlify.app/

Bundle size report

Total Size Change:${\tiny{\color{green}▼}}$-1.58KB(-0.01%) - Total Gzip Change:${\tiny{\color{green}▼}}$-431B(-0.01%)
Files: 118 total (0 added, 0 removed, 17 changed)

Show 17 more bundle changes

@mui/x-charts-pro/Heatmapparsed:${\tiny{\color{green}▼}}$-98B(-0.05%) gzip:${\tiny{\color{green}▼}}$-20B(-0.03%)
@mui/x-charts/ChartsAxisparsed:${\tiny{\color{green}▼}}$-95B(-0.13%) gzip:${\tiny{\color{green}▼}}$-19B(-0.08%)
@mui/x-charts/ChartsXAxisparsed:${\tiny{\color{green}▼}}$-95B(-0.14%) gzip:${\tiny{\color{green}▼}}$-14B(-0.06%)
@mui/x-charts/ChartsYAxisparsed:${\tiny{\color{green}▼}}$-95B(-0.14%) gzip:${\tiny{\color{green}▼}}$-15B(-0.06%)
@mui/x-chartsparsed:${\tiny{\color{green}▼}}$-92B(-0.04%) gzip:${\tiny{\color{green}▼}}$-33B(-0.04%)
@mui/x-charts-proparsed:${\tiny{\color{green}▼}}$-92B(-0.03%) gzip:${\tiny{\color{green}▼}}$-27B(-0.03%)
@mui/x-charts-pro/BarChartProparsed:${\tiny{\color{green}▼}}$-92B(-0.04%) gzip:${\tiny{\color{green}▼}}$-26B(-0.04%)
@mui/x-charts-pro/FunnelChartparsed:${\tiny{\color{green}▼}}$-92B(-0.05%) gzip:${\tiny{\color{green}▼}}$-30B(-0.05%)
@mui/x-charts-pro/LineChartProparsed:${\tiny{\color{green}▼}}$-92B(-0.04%) gzip:${\tiny{\color{green}▼}}$-20B(-0.03%)
@mui/x-charts-pro/ScatterChartProparsed:${\tiny{\color{green}▼}}$-92B(-0.05%) gzip:${\tiny{\color{green}▼}}$-39B(-0.06%)
@mui/x-charts/BarChartparsed:${\tiny{\color{green}▼}}$-92B(-0.05%) gzip:${\tiny{\color{green}▼}}$-25B(-0.04%)
@mui/x-charts/ChartsReferenceLineparsed:${\tiny{\color{green}▼}}$-92B(-0.15%) gzip:${\tiny{\color{green}▼}}$-26B(-0.12%)
@mui/x-charts/Gaugeparsed:${\tiny{\color{green}▼}}$-92B(-0.09%) gzip:${\tiny{\color{green}▼}}$-18B(-0.05%)
@mui/x-charts/LineChartparsed:${\tiny{\color{green}▼}}$-92B(-0.05%) gzip:${\tiny{\color{green}▼}}$-39B(-0.06%)
@mui/x-charts/RadarChartparsed:${\tiny{\color{green}▼}}$-92B(-0.06%) gzip:${\tiny{\color{green}▼}}$-25B(-0.05%)
@mui/x-charts/ScatterChartparsed:${\tiny{\color{green}▼}}$-92B(-0.06%) gzip:${\tiny{\color{green}▼}}$-36B(-0.07%)
@mui/x-charts/ChartsTextparsed:${\tiny{\color{green}▼}}$-89B(-2.93%) gzip:${\tiny{\color{green}▼}}$-19B(-1.26%)

Details of bundle changes

Generated by 🚫 dangerJS against 88a0540

@bernardobelchior bernardobelchior added type: enhancement This is not a bug, nor a new feature scope: charts Changes or issues related to the charts product labels May 23, 2025
Copy link

codspeed-hq bot commented May 23, 2025

CodSpeed Performance Report

Merging #17982 will not alter performance

Comparing bernardobelchior:use-map-string-cache (88a0540) with master (2583a52)

Summary

✅ 9 untouched benchmarks

@bernardobelchior bernardobelchior requested review from alexfauquette and JCQuintas and removed request for alexfauquette May 23, 2025 16:00
@bernardobelchior bernardobelchior marked this pull request as ready for review May 23, 2025 16:00
@bernardobelchior bernardobelchior merged commit a467e1c into mui:master May 26, 2025
28 of 29 checks passed
@bernardobelchior bernardobelchior deleted the use-map-string-cache branch May 26, 2025 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: charts Changes or issues related to the charts product type: enhancement This is not a bug, nor a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants