Commit 001f5de
authored
perf(turbo-tasks): Use the type information we already have for all ResolvedVc casts, expose synchronous versions of functions (#75055)
We already have type information for `ResolvedVc`, so we can avoid going through the codepath in `Vc`, which can fail and requires a cell read.
I did this for sidecasts in #74844 to unblock synchronous graph traversals. This does the same for the rest of the functions.
I expect any perf impact to be pretty small (casting isn't a particularly hot codepath), but it's also an easy change to make, and (once callsites are migrated) will lead to a nicer API.
Right now I'm continuing to expose the async fallible versions of these functions. I'll port the callsites (looks like there's 92 of them) to the synchronous infallible version in a later PR.1 parent 5de5b9a commit 001f5de
2 files changed
+48
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
305 | 314 | | |
306 | 315 | | |
307 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
261 | 274 | | |
262 | 275 | | |
263 | 276 | | |
| |||
269 | 282 | | |
270 | 283 | | |
271 | 284 | | |
272 | | - | |
273 | | - | |
274 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
275 | 307 | | |
276 | 308 | | |
277 | 309 | | |
| |||
0 commit comments