Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How big can be executable?

How big can be executable?

Scheduled Pinned Locked Moved C / C++ / MFC
question
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    oleg63
    wrote on last edited by
    #1

    Hi, Now my executable is more than 80 MB. Is there some recommendations for the size of executable? Thanks.

    H J 2 Replies Last reply
    0
    • O oleg63

      Hi, Now my executable is more than 80 MB. Is there some recommendations for the size of executable? Thanks.

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Yes break your file(exe) to dll files


      WhiteSky


      O 1 Reply Last reply
      0
      • O oleg63

        Hi, Now my executable is more than 80 MB. Is there some recommendations for the size of executable? Thanks.

        J Offline
        J Offline
        James R Twine
        wrote on last edited by
        #3

        Depends - are you talking about its physical size on disk, or its footprint when in memory?    Converting things like static LIBs to DLLs may actually increase the total size of your end-user distribution, because when you link in a static LIB, you only pull in the functions that you need.  But a DLL will contain ALL functions in the library, even if your application only uses 5 out of 80 of them.    If you are talking about your footprint, 80MB may or may not be all that bad, depending on what your application is doing.  If it is acting as a database or processing engine, it might not be bad.  If it is a fancy text editor working with a 1MB file, it might be.    Peace!

        -=- James
        Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
        Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
        See DeleteFXPFiles

        O 1 Reply Last reply
        0
        • H Hamid Taebi

          Yes break your file(exe) to dll files


          WhiteSky


          O Offline
          O Offline
          oleg63
          wrote on last edited by
          #4

          Is there some recommendations for size and how to do that properly? Thanks.

          1 Reply Last reply
          0
          • J James R Twine

            Depends - are you talking about its physical size on disk, or its footprint when in memory?    Converting things like static LIBs to DLLs may actually increase the total size of your end-user distribution, because when you link in a static LIB, you only pull in the functions that you need.  But a DLL will contain ALL functions in the library, even if your application only uses 5 out of 80 of them.    If you are talking about your footprint, 80MB may or may not be all that bad, depending on what your application is doing.  If it is acting as a database or processing engine, it might not be bad.  If it is a fancy text editor working with a 1MB file, it might be.    Peace!

            -=- James
            Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
            Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
            See DeleteFXPFiles

            O Offline
            O Offline
            oleg63
            wrote on last edited by
            #5

            Actually my application is a scientific application which combine MFC based front end and calculations in Fortran static library. During the run program doing a quite freqent allocations/deallocation of big arrays for the calculations. And another concern is a project compilation time. It's take a while to compile. Could you recommend something about it? Thanks.

            J R 2 Replies Last reply
            0
            • O oleg63

              Actually my application is a scientific application which combine MFC based front end and calculations in Fortran static library. During the run program doing a quite freqent allocations/deallocation of big arrays for the calculations. And another concern is a project compilation time. It's take a while to compile. Could you recommend something about it? Thanks.

              J Offline
              J Offline
              James R Twine
              wrote on last edited by
              #6

              Since you are not building the libraries (they are [preexting] Fortran libraries), you are seeing app build delays.  Correct use of pre-compile headers is likely the best way to improve compilation times.    Breaking up larger CPP files into small ones can improve build times if you are making code changes, but might not affect release build times.  Other than that - no suggestions.    As far as runtime performance, not constantly throwing away allocated memory (keep it around and reuse it as much as possible) is likely your best option.  Your users know the kind of application they are using and should expect it to be a bit of a hog at times.    Peace!

              -=- James
              Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
              Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
              See DeleteFXPFiles

              1 Reply Last reply
              0
              • O oleg63

                Actually my application is a scientific application which combine MFC based front end and calculations in Fortran static library. During the run program doing a quite freqent allocations/deallocation of big arrays for the calculations. And another concern is a project compilation time. It's take a while to compile. Could you recommend something about it? Thanks.

                R Offline
                R Offline
                realJSOP
                wrote on last edited by
                #7

                On top of what James said regarding app performance, if you're app is creating/destroying a lot of threads, consider creating the threads just once, and then just starting them. Creating/destroying threads can cause quite a bit of overhead. As far as file size, an 80mb file could take quite a bit of time to initially load. You might want to consider breaking the app into DLLs that load when needed the first time, and stay in memory until the app is shut down.

                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups