The VC ++ client reduces the package size and the vc size.

Source: Internet
Author: User
Tags export class

The VC ++ client reduces the package size and the vc size.
Image compression:

1. The size of the background image is generally-kb. The solid color image can be reduced to 1-3 kb. The method can be reduced to more than 1 MB;
2. ico is generally 256-256 kb, 16x16 to x, which can be reduced by about 50 kb after several sizes are subtracted. exe with. ico can be reduced;
3. The. ico file is compiled into the exe file. During packaging, the. ico file does not need to be in the resource Directory;
3. Similarly,. ico in 7zsd_All_admin.sfx can be reduced.

 

Code Section:

1. Use webAssit instead of firebreath;
2. static libraries are replaced by dynamic libraries. The larger the size of the dynamic library export class, the smaller the effect is. The dll is called only when more than 10 modules exist, results will appear;
3. Cancel the generation of. pdb under release. You only need to retain key programs, such as plugin and bho;
4. function merging: simple functions, such as self-uninstalling and integrating into the uninstalling program, reduce the module. I tested an exe that only contains the configuration file, but the size increased by kb; of course, functional merging violates the loose coupling of software design. Alas, we can't help but reduce the size by any means, and then reduce the coupling of code layers;
5. the commonly used public library cpp function ensures that it is commonly used and is rarely called. consider throwing it into other classes;

6. Consider the Optimization of Configuration --> C/C ++ --> Optimization compilation options. The Mininize Size (/O1) veteran did not test this.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.