Replies: 1 comment 3 replies
-
|
For illustration: from Here clearly |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've enabled
large_futureslint in one large project I'm working on and I got many matches for this lint. Clippy only suggests to
Box::pin(...)the futures. However, inspecting the generated future typescargo +nightly rustc --lib -- -Zprint-type-sizesoften exposes some large variable held across.awaitpoints (in Suspend states) that are often the reason for the futures' sizes.I think it would be useful to go through the variables stored in future enum variants and report big ones.
I am aware of
large_stack_frameslint, but it floods output with lots of other info (including the large futures themselves), which is not useful when performing the optimizations.Also, I haven't found other discussions about this particular use case.
What do you think? Is this even possible to implement? Is it actually useful?
Beta Was this translation helpful? Give feedback.
All reactions