Idea: Can we cache the result of typeToTypeNode
?
#44043
Labels
Domain: Performance
Reports of unusually slow behavior
Rescheduled
This issue was previously scheduled to an earlier milestone
Milestone
A large percentage of declaration emit time (and a small percentage of check time) is spent in
typeToTypeNode
and tracing indicates that it is called on some types many times (hundreds or thousands in a sufficiently large project). I suspect, but have been able to demonstrate, that those requiring aimport()
qualification are particularly expensive. Could we cache the result? Two clear obstacles:typeToTypeNode
takes a complex context argument. Possible workarounds include including the context hash in the cache key and storing the cached value on the context.The text was updated successfully, but these errors were encountered: