-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance of depth-limited type printing in stack traces #55952
Comments
Try the latest nightly, xref #55575. |
I just tried it. It's actually slower on nightly. ~ 148 seconds |
I think this is the same as #37990. The code tries to check if this type could potentially have a type alias somewhere and in that case print the type alias. This check is very slow and it is done over and over and over. Lines 729 to 754 in 1cfda3f
|
The solution here is to not form the whole type string because it is ridiculously large. Instead the printing should stop going down the nesting once we know we have gone far enough down to not make a difference to the stacktrace type printing. |
Can we improve the performance of depth-limited type printing in stack traces? Here is an example where printing truncated types takes quite a while with a highly nested struct:
I haven't looked at the implementation in a while, but I imagine that this could be related to #55807.
The text was updated successfully, but these errors were encountered: