Commit 09dc39e
committed
perf: optimize style merging performance and readability
Address code review feedback by improving the style merging logic:
- Remove Set creation and array spreading for better performance
- Add early exit when finding non-overlapping properties
- Simplify logic flow making it more readable and maintainable
- Maintain identical functionality while reducing computational overhead
Performance improvements are especially beneficial for components
with many style properties, reducing unnecessary object iterations.1 parent 1a95f86 commit 09dc39e
1 file changed
+20
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
| 148 | + | |
144 | 149 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
150 | 162 | | |
151 | | - | |
152 | | - | |
| 163 | + | |
153 | 164 | | |
154 | | - | |
| 165 | + | |
155 | 166 | | |
156 | 167 | | |
157 | 168 | | |
| |||
0 commit comments