Commit a3106f0
authored
Micro optimisations & perf updates (#557)
Work in progress but this PR does:
* Reduce branching in hot paths (or attempt to clean up)
* Reduce look ups in variables, const them out earlier
* Reduce assert fn calls where we no longer need them
* Deduplicate a lot of code
Avoiding Text paths for now, as that's part of another change.
Big gains on node creation / node deletion, still investigating the
update/swap cases.File tree
9 files changed
+398
-413
lines changed- examples/tests
- src/core
- renderers/webgl
- text-rendering/renderers/SdfTextRenderer
9 files changed
+398
-413
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | 106 | | |
109 | 107 | | |
110 | 108 | | |
| |||
115 | 113 | | |
116 | 114 | | |
117 | 115 | | |
| 116 | + | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
| |||
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
164 | 174 | | |
165 | 175 | | |
166 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
167 | 196 | | |
168 | 197 | | |
169 | 198 | | |
| |||
194 | 223 | | |
195 | 224 | | |
196 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
197 | 239 | | |
198 | 240 | | |
199 | 241 | | |
200 | 242 | | |
201 | 243 | | |
202 | 244 | | |
203 | 245 | | |
204 | | - | |
205 | | - | |
206 | | - | |
| 246 | + | |
207 | 247 | | |
208 | 248 | | |
209 | 249 | | |
| |||
0 commit comments