-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
More heap allocations than structopt #4956
Comments
Dhat files can be viewed here https://nnethercote.github.io/dh_view/dh_view.html |
Could you include a reproduction case? |
|
Also, could you describe the end-user impact. Is this noticeable in any way? For example, in #4774 we are discussing the impact of clap initialization time on the full startup time of the application, affecting the more interactive experience of the user. |
I found no measurable difference in initialization time. To measure it, I added this code after
And I ran this 3 times:
Structopt: 0.158s, 0.010s, 0.008s Clap: 0.168s, 0.011s, 0.009s I also measured the binary size. Structopt: 12,029,348 bytes Clap: 12,160,608 bytes (1.1% increase) And I used Structopt: 1130 bytes Clap: 978 bytes |
Sounds like the end-user impact of these increased allocations is negligible which has me leaning towards closing this. If you have a reason we should actively focus on this, let us know! I suspect some of our work towards #2037 and #1365 might help. We are exploring making more settings of #4959 would be the biggest change for reducing allocations as it will make it so we don't even instantiate |
I tested the heap usage of wasm-pack when using it to compile wasm_game_of_life before and after upgrading from structopt to clap 4.3. The total allocated bytes increased by 22%, and the maximum allocated bytes (t-gmax) increased by 57%.
dhat-heap.zip
The text was updated successfully, but these errors were encountered: