Open DanielRosenwasser opened 5 months ago
I tried to do a quick profile to look for major differences. Here's what I'm seeing:
I think I've mostly figured out what's going on here; #58337 made getResolvedSignature
move the bottom of the resolution stack up. However, this also affects other functions that use the resolution stack for querying whether or not resolution is progress (without push/pop/error-ing). In this particular case, it looks like isResolvingReturnTypeOfSignature
is what has changed behavior.
If I make it so that only the push/pop circularity code starts at the "new" bottom, allowing all of the other functions to use the whole stack for their queries, the perf problem goes away.
I'll send a PR for looking, or at least to spawn a better investigation.
It seems likely it was #58337 that was responsible for the performance hit in https://github.com/arktypeio/arktype
(previously incorrectly attributed it to https://github.com/microsoft/TypeScript/pull/58372)
Originally posted by @ssalbdivad in https://github.com/microsoft/TypeScript/issues/58337#issuecomment-2154832204