Jump to content
PeterPanettone

Show executable size after successful build?

Recommended Posts

After a successful build, this message is shown:

 

image.png.ff7534590edbd872bc0c92b170e5c74c.png

 

Is it possible to show the size of the executable file as additional information in the Messages window?

Share this post


Link to post
34 minutes ago, PeterPanettone said:

After a successful build, this message is shown:

 

image.png.ff7534590edbd872bc0c92b170e5c74c.png

 

Is it possible to show the size of the executable file as additional information in the Messages window?

There is no built in option for that, but a plugin could add this information.

Share this post


Link to post
7 minutes ago, dummzeuch said:

There is no built in option for that, but a plugin could add this information.

Do you mean GExperts could achieve this, formatted as MB with two decimal digits? That would be wonderful!

Share this post


Link to post
46 minutes ago, PeterPanettone said:

Do you mean GExperts could achieve this, formatted as MB with two decimal digits? That would be wonderful!

GExperts as well as any other IDE plugin.

Share this post


Link to post

Please add this option to GExperts as soon as possible. Many users will be happy about it! Thank you!

Share this post


Link to post
On 7/27/2024 at 12:58 PM, PeterPanettone said:

Please add this option to GExperts as soon as possible. Many users will be happy about it! Thank you!

Really? Why?

  • Sad 1

Share this post


Link to post

Well, the size of the executable created is just as important (or even more important) information than the build/compile time, which has always been displayed.

Share this post


Link to post
1 hour ago, PeterPanettone said:

Well, the size of the executable created is just as important (or even more important) information than the build/compile time, which has always been displayed.

Uh, okay, not really an answer. Personally, if the build is running I can see the usefulness of a timer, especially if I am doing a big ARM64 build for Mac and I have a general idea of how long it takes. 

 

On the other hand, I have no idea why I would care what the executable size was after linking. 

 

I wouldn't really care if they added it, but I have no idea why someone would be happy to have it added, which is why I asked.

Share this post


Link to post

Well, a developer's requirements can be different. For example, the decision to include a certain component at design time or not could depend on the size of the executable. Therefore, the size of the executable could certainly be an interesting information.

 

For example, it could matter whether the executable size is 10 MB or over 100 MB.

Share this post


Link to post

After doing a build, on the Projects pane you can right click the active build configuration and select "Show in Explorer" to look at the files. A few times I have done it to check the size but mostly it is to copy the file to the Windows Sandbox for some testing. 

 

image.thumb.png.aefebeb4bbb683b5489cd9ac294fd54c.png

  • Like 1

Share this post


Link to post

Also in the Project menu the Information for Project gives you the file size (and some more possibly useful information). It is not the same as to display it directly in the compile dialog, but some people (like myself) opt to automatically close it on success.

  • Like 2
  • Thanks 1

Share this post


Link to post
10 hours ago, PeterPanettone said:

For example, it could matter whether the executable size is 10 MB or over 100 MB.

Why would it matter if it is 10MB or 100MB or even 1000MB?

  • Sad 1

Share this post


Link to post
10 hours ago, PeterPanettone said:

For example, it could matter whether the executable size is 10 MB or over 100 MB.

So check the size in explorer. Not like you need to do this repeatedly. Are you having trouble using explorer? 

Share this post


Link to post

debug version is bloated anyway, who cares what size the executable has?

switch to visual c++, they are already complaining if the exe is over 80kb 🙂

 

 

Share this post


Link to post
Posted (edited)
8 minutes ago, Attila Kovacs said:

debug version is bloated anyway

Exactly. This is another reason to show the executable size after success and duration information—both for the debug and release build configurations.

Edited by PeterPanettone

Share this post


Link to post
22 minutes ago, PeterPanettone said:

Exactly. This is another reason to show the executable size after success and duration information—both for the debug and release build configurations.

You can define a post-build event; even a simple .bat file containing something like "dir app.exe" can print this information to the "Output" tab in the IDE.

Or, instead of "dir":

forfiles /P "C:\MyAppFolder" /M "MyAppName.exe" /C "cmd /c echo @file: @fsize"

Share this post


Link to post
45 minutes ago, PeterPanettone said:

Exactly. This is another reason to show the executable size after success and duration information—both for the debug and release build configurations.

But it doesn't change from one build to the next. Or is your problem that on Monday you know that the executable is 25mb but come Tuesday you've forgotten. Maybe you should get some post it notes. 

  • Haha 1

Share this post


Link to post
21 minutes ago, David Heffernan said:

But it doesn't change from one build to the next. Or is your problem that on Monday you know that the executable is 25mb but come Tuesday you've forgotten. Maybe you should get some post it notes. 

Stop harassing Peter, please.

Share this post


Link to post
21 minutes ago, dummzeuch said:

Stop harassing Peter, please.

In that case, you should answer to us the important question. Why would anyone care after every compile on the size of an executable file. We are eager to find out the reasons. It is now the most important topic on this forum and our questions remain unanswered.

Share this post


Link to post
Posted (edited)
21 minutes ago, Lajos Juhász said:

our questions remain unanswered

Please read:

Click here: image.png.7a16a13682980b234aeadddbe992aaf8.png

Edited by PeterPanettone

Share this post


Link to post

I found this funny anecdote. While it doesn't fully apply to this topic, it can still be thought-inducing:

 

Five monkeys are placed in a cage with a banana hanging from a ladder. Every time a monkey tries to get the banana, all the monkeys are splashed with cold water. Soon, each monkey hits anyone who tries to get the banana to avoid punishment.

 

One by one, the monkeys are replaced by new ones. The others beat Each new monkey when it tries to get the banana, although water jets are no longer used. Ultimately, all the monkeys beat each other, even though none have experienced the original punishment. They do it because it has "always been done that way."

Share this post


Link to post

That is why I should be interested in the size of executable to not be get beaten by you? Strange but okay. 

 

Now please ASAP implement to show the size of executable on compile!

Share this post


Link to post

Peter: this is not an anecdote. That was a real scientific experiment.

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×