Re: Source of EXE Size



What is the total size of all FRX files? You can use Windows Explorer for
that, sort by type in detail view, and select all FRX files. It's easy to
do.

IMO, there is no benefit from putting the images in a DLL. VB doesn't load
everything at startup, only when needed. EXE's and DLL's have sections and
each section can be marked by a compiler to either preloaded or load on
demand, so not everything is loaded at startup.

"Dan Johnson" <johnson@xxxxxxxxxx> wrote in message
news:c0260$432975f2$d826dfe9$24601@xxxxxxxxxxxxxx
> Thanks for the interesting breakdown on how to determine the size.
>
> Is there really any benefit to taking all image files and putting them in
> a
> DLL, where they can be retrieved by the exe file on startup? You
> obviously
> end up with a huge DLL, but with a small exe. I don't really see any
> performance change now that my exe has grown from 1,900 KB to 3,800 KB, so
> should I really care at this point? Are there any "hidden" factors that
> would motivate me to spend the time moving images to a dll to get the size
> of the exe down?
>
> Dan
>
> "Someone" <nobody@xxxxxxx> wrote in message
> news:Cz3We.250508$E95.239319@xxxxxxxxxxxxx
>> One could tell what is contributing to the size of the EXE by summing the
>> total number of bytes for all FRX files. If the total size for all FRX
> files
>> is 3 MB, for example, and the EXE is 4 MB, then the code is 1 MB. The EXE
>> can be reduced down to 1 MB at most by cleaning up the FRX files, but
>> obviously some images and binary data are needed.
>>
>> If your objective is to save downloading bandwidth, do not bother with
>> converting BMP files to GIF's and the extra coding to handle that. If you
>> zip a BMP file, you get a file as small as a GIF or smaller, try it! You
>> could use JPEG files if the quality is acceptable though.
>>
>> If you have many FRX files, just target the largest one, don't bother
>> with
>> those that only have few kilobytes.
>>
>>
>>
>> "MikeD" <nobody@xxxxxxxxxxx> wrote in message
>> news:ON8zOPXuFHA.2072@xxxxxxxxxxxxxxxxxxxxxxx
>> >
>> > "Dan Johnson" <johnson@xxxxxxxxxx> wrote in message
>> > news:3566f$4326e3ea$d826dfe9$18121@xxxxxxxxxxxxxx
>> >> To answer both Chris and your questions...
>> >>
>> >>> > My VB6 executable file has significantly increased in size ....
>> >>>
>> >>> Since when?
>> >>
>> >> ***Over the last several months it's gone from approx. 1,900 KB to
> 3,800
>> >> KB.
>> >
>> > You said over the last several months. That in itself doesn't mean
>> > anything. In several months, you might have added 1 line of code or
>> > thousands of lines of code. Obviously, if you've added thousands of
> lines
>> > of code, the size of the EXE is going to increase.
>> >
>> > I do recall hearing of a bug in VB (not sure what version of VB or if
>> > it
>> > ever got fixed) where an EXE would grow in size upon recompilation even
> if
>> > no changes whatsoever were made to the project. I seem to remember this
>> > affecting VB3 and under, but I'm hardly sure about that.
>> >
>> > In any case, if you've made very few changes to the project (in code,
>> > adding controls or forms, etc.) and the size of the EXE grows
>> > considerably, some things to keep in mind are resources you might have
>> > added. IOW, you could have added picture, sound, etc. resources and not
>> > have made many code changes at all. However, this could cause the size
> of
>> > the EXE to be considerably larger.
>> >
>> > --
>> > Mike
>> > Microsoft MVP Visual Basic
>> >
>> >
>>
>>
>
>


.



Relevant Pages

  • Re: Source of EXE Size
    ... DLL, where they can be retrieved by the exe file on startup? ... > total number of bytes for all FRX files. ... > obviously some images and binary data are needed. ...
    (microsoft.public.vb.general.discussion)
  • Re: Source of EXE Size
    ... > that, sort by type in detail view, and select all FRX files. ... there is no benefit from putting the images in a DLL. ... >> DLL, where they can be retrieved by the exe file on startup? ...
    (microsoft.public.vb.general.discussion)
  • Re: Graphic performance
    ... Size of the bitmap you're drawing ... Source of the bitmap (DLL or EXE, it would seem, but where is the EXE or ... DLL located? ... need to change some images on the screen and paint few part of the screen. ...
    (microsoft.public.windowsce.embedded)
  • Re: Source of EXE Size
    ... >> DLL, where they can be retrieved by the exe file on startup? ... Most other programmers aren't either (inspite ... If you kept them just playing with images - then you just move ...
    (microsoft.public.vb.general.discussion)
  • Re: Source of EXE Size
    ... > Is there really any benefit to taking all image files and putting them in ... > DLL, where they can be retrieved by the exe file on startup? ... If you kept them just playing with images - then you just move 'when' ...
    (microsoft.public.vb.general.discussion)

Loading