Skip to content

[internal] Only clone props if needed#24892

Merged
oliviertassinari merged 3 commits intomui:nextfrom
oliviertassinari:lazyclone
Feb 12, 2021
Merged

[internal] Only clone props if needed#24892
oliviertassinari merged 3 commits intomui:nextfrom
oliviertassinari:lazyclone

Conversation

@oliviertassinari
Copy link
Member

Instead of blindly cloning the incoming props, we now only do it if there is a matching item in the theme. I have added a benchmark too. It doesn't seem to make a huge difference. But at least it's sound.

  • v4 - Table: 81.40 ±00.54ms
  • HEAD - Table: 99.50 ±00.72ms
  • PR - Table: 99.80 ±01.47ms

@oliviertassinari oliviertassinari added performance internal Behind-the-scenes enhancement. Formerly called “core”. labels Feb 12, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Feb 12, 2021

Details of bundle changes

Generated by 🚫 dangerJS against f18cbb9

@oliviertassinari oliviertassinari merged commit 7f31be8 into mui:next Feb 12, 2021
@oliviertassinari oliviertassinari deleted the lazyclone branch February 12, 2021 23:19
@eps1lon
Copy link
Member

eps1lon commented Mar 18, 2021

Forgot to update the results in benchmark/browser/README.md.

@eps1lon
Copy link
Member

eps1lon commented Mar 18, 2021

Updated in #25402

@oliviertassinari oliviertassinari changed the title [core] Only clone props if needed [internal] Only clone props if needed Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Behind-the-scenes enhancement. Formerly called “core”. performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants