Commit c7d55de
committed
Make class prop resolution faster (#28766)
`delete` causes an object (in V8, and maybe other engines) to deopt to a
dictionary instead of a class. Instead of `assign` + `delete`, manually
iterate over all the properties, like the JSX runtime does.
To avoid copying the object twice I moved the `ref` prop removal to come
before handling default props. If we already cloned the props to remove
`ref`, then we can skip cloning again to handle default props.
DiffTrain build for [bfd8da8](bfd8da8)1 parent 1d8cde0 commit c7d55de
File tree
23 files changed
+1715
-1623
lines changed- compiled/facebook-www
23 files changed
+1715
-1623
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
14287 | 14287 | | |
14288 | 14288 | | |
14289 | 14289 | | |
14290 | | - | |
| 14290 | + | |
| 14291 | + | |
| 14292 | + | |
| 14293 | + | |
| 14294 | + | |
| 14295 | + | |
| 14296 | + | |
| 14297 | + | |
| 14298 | + | |
| 14299 | + | |
| 14300 | + | |
| 14301 | + | |
| 14302 | + | |
| 14303 | + | |
14291 | 14304 | | |
14292 | 14305 | | |
14293 | 14306 | | |
| |||
14296 | 14309 | | |
14297 | 14310 | | |
14298 | 14311 | | |
14299 | | - | |
| 14312 | + | |
| 14313 | + | |
| 14314 | + | |
| 14315 | + | |
| 14316 | + | |
14300 | 14317 | | |
14301 | | - | |
14302 | | - | |
14303 | | - | |
| 14318 | + | |
| 14319 | + | |
| 14320 | + | |
14304 | 14321 | | |
14305 | 14322 | | |
14306 | 14323 | | |
14307 | 14324 | | |
14308 | | - | |
14309 | | - | |
14310 | | - | |
14311 | | - | |
14312 | | - | |
14313 | | - | |
14314 | | - | |
14315 | | - | |
14316 | | - | |
14317 | | - | |
14318 | | - | |
14319 | 14325 | | |
14320 | 14326 | | |
14321 | 14327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
13997 | 13997 | | |
13998 | 13998 | | |
13999 | 13999 | | |
14000 | | - | |
| 14000 | + | |
| 14001 | + | |
| 14002 | + | |
| 14003 | + | |
| 14004 | + | |
| 14005 | + | |
| 14006 | + | |
| 14007 | + | |
| 14008 | + | |
| 14009 | + | |
| 14010 | + | |
| 14011 | + | |
| 14012 | + | |
| 14013 | + | |
14001 | 14014 | | |
14002 | 14015 | | |
14003 | 14016 | | |
| |||
14006 | 14019 | | |
14007 | 14020 | | |
14008 | 14021 | | |
14009 | | - | |
| 14022 | + | |
| 14023 | + | |
| 14024 | + | |
| 14025 | + | |
| 14026 | + | |
14010 | 14027 | | |
14011 | | - | |
14012 | | - | |
14013 | | - | |
| 14028 | + | |
| 14029 | + | |
| 14030 | + | |
14014 | 14031 | | |
14015 | 14032 | | |
14016 | 14033 | | |
14017 | 14034 | | |
14018 | | - | |
14019 | | - | |
14020 | | - | |
14021 | | - | |
14022 | | - | |
14023 | | - | |
14024 | | - | |
14025 | | - | |
14026 | | - | |
14027 | | - | |
14028 | | - | |
14029 | 14035 | | |
14030 | 14036 | | |
14031 | 14037 | | |
| |||
0 commit comments