-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[core] perf: sx #44254
Open
romgrk
wants to merge
55
commits into
mui:master
Choose a base branch
from
romgrk:perf-sx
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[core] perf: sx #44254
Changes from 13 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
cb1539b
perf: initial work
romgrk be47607
perf: more work
romgrk e387422
lint
romgrk 2da8c80
lint
romgrk 5cf7676
lint
romgrk f65132c
lint
romgrk 490e808
lint
romgrk 17eb786
lint
romgrk 6d2f759
lint
romgrk 4f7de94
lint
romgrk 89d3e11
perf: more work
romgrk d88d4db
lint
romgrk c288aac
perf: remove allocations
romgrk 7d70f97
lint
romgrk a221c46
perf: container queries
romgrk b1cdfcb
lint
romgrk d4141ca
Merge branch 'master' into perf-sx
romgrk f7fe570
lint
romgrk ec67cbb
lint
romgrk 5ef7075
perf: compose()
romgrk 0123e02
refactor: alternateProp logic for fontFamilyCode
romgrk 07e4410
lint
romgrk f202bc8
lint
romgrk d9f7017
lint
romgrk 046d66b
lint
romgrk d586a77
perf: improve breakpoint mq cloning
romgrk 8330b43
lint
romgrk b9642a7
fix: breakpoints
romgrk 520a5d2
lint
romgrk 096c50b
lint
romgrk f3749aa
lint
romgrk 3171351
lint
romgrk 7e0e0c1
lint
romgrk fff7e0b
perf: spacing
romgrk 40cc09d
lint
romgrk c1fb261
fix: tests
romgrk 739f020
lint
romgrk 2d09be5
refactor: remove EMPTY_BREAKPOINTS
romgrk 2874595
fix
romgrk e3de9d8
lint
romgrk 6eac84f
lint
romgrk 8790800
lint
romgrk 9d995d0
lint
romgrk 013e87d
lint
romgrk ec1914a
lint
romgrk 6c32c64
refactor: hasBreakpoint
romgrk e6f2319
lint
romgrk db32450
lint
romgrk b120356
lint
romgrk aa57a19
refactor: removeUnusedBreakpoints
romgrk 0b6c30d
refactor: iterateBreakpoints
romgrk 811d63a
refactor: sortContainerQueries
romgrk 419cfc6
lint
romgrk f096175
lint
romgrk 3455a04
lint
romgrk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import deepmerge from '@mui/utils/deepmerge'; | ||
|
||
function merge(acc, item) { | ||
if (!item) { | ||
return acc; | ||
} | ||
const options = { | ||
clone: false, | ||
}; | ||
|
||
return deepmerge(acc, item, { | ||
clone: false, // No need to clone deep, it's way faster. | ||
}); | ||
function merge(acc, item) { | ||
return deepmerge(acc, item, options); | ||
} | ||
|
||
export default merge; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I name something
fast...
it usually means there's a trade-off with correctness to focus on being "fast". Here it's that it doesn't handle exotic objects as other implementations will, as in, it will also traverse enumerable properties on the object's prototype. In the cases where we use this function (to create React props objects copies, or to create CSS style objects) we can safely assume that invariant is true. I should add this to the jsdoc, but I like having some sort of warning in the name.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this to the jsdom would definitely help. On the other hand, I would recommend maybe moving this util outside of @mui/utils, if it is only used in the mui-system, to avoid developers accidently using it in other places where it may not be the right thing. If you already plan to use it in other places, then probably we can keep it in @mui/utils.