My bin-release for a very simple Web project using Flex 4 is weighing in at 1.5MB. 40% of that is taken up by one single file which is over 600K all by itself.
Here are the files that take up most of the vo开发者_JAVA技巧lume:
framework_4.0.0.14159.swz 608KB
spark_4.0.0.14159.swz 311KB
textLayout_1.0.0.595.swz 153KB
There are others as well, but this is over a megabyte right there. All this was fine when I was writing components for a large Flex application, but now I need to do widgets on an HTML page using a CMS.
Are all these files really necessary to deploy? Are there things I can do to cut down the weight?
After getting only 3 views and no answers, I researched this elsewhere. To sum up, the fix involves opening the project properties in Flex, select Flex Compiler > Compiler Options and unchecking the box for "Copy non-embedded files to output folder". This reduces the size drastically, though the final executable is still around 600K.
精彩评论