4 Replies Latest reply on Mar 17, 2007 11:42 AM by Shiv_Kumar

    SWF File size changes randomly

    Matlus Level 1
      I have noticed this with almost of of my Flex projects. One day the swf file size is about 600K the next day it goes to 1.4MB. Shutting the IDE down and restarting it and then building seems to change the file size. If you repeatedly build in the same IDE session you won't see this change.

      It happend again today which is why I'm writing
      My app started out at about 640k.
      I added a component and a bunch of code and my app shot up to 1.4MB
      I eventually released this version and shut down the IDE
      10 minutes later I restarted the IDE and re-built the same project and the swf file size dropped to 1.1MB
      All I did was add a fontSize="12" attribute to one of the component.
      Take my changes out and build. No change the swf is still at 1.1MB.

      What gives?
        • 1. Re: SWF File size changes randomly
          jpwrunyan Level 1
          That is strange. I have observed compiled .swfs on my system but have never seen what you describe.
          Usually, I can reduce file size by removing imports and references. That keeps unneeded classes out of the .swf's library.
          You don't happen to have any imported images or anything, do you? Still, I can't imagine that would have any affect. For the sake of clarity, maybe you should post this in Flex Builder and include your compiler settings. There is a setting for compiling smaller .swf files but it is set to true by default.

          This is no way explains, however, why the .swf gets progressively bigger.
          Anyway, let me know if you find the problem.
          • 2. Re: SWF File size changes randomly
            Matlus Level 1
            I have a few embedded images and I too initially suspected something to do with that, but then it didn't make sense because when I run the SWF the images show up no matter what the size of the swf.

            I haven't messed with/changed any compiler options/settings so its all default.

            I just tried it once again. I had just deployed the swf from one of my apps which was 1,437KB. After writing the previous sentence, I restarted Flex Builder, made a change (and undid the change) and saved, which initiates a build. The swf file is now 1,179KB.

            Would it help someone at Adobe if I gave you guys the two different swf files? If I knew how to produce a reproducible case I'd do that instead.

            JP thanks for listening.

            Shiv.

            • 3. Re: SWF File size changes randomly
              MrMetlHed
              I just saw the same type of problem. I've been compiling a project a number of times over the past couple of days at about ~1.3MB. Just two seconds ago it compiled at 975K. Needless to say, I'd love to have it continue compiling at the smaller size, but I'm not hopeful (it seems random at this point). Any idea what's going on here? I haven't changed any settings at all, and the only difference between the large and small file size was that I actually added an extra mx:Label tag.
              • 4. Re: SWF File size changes randomly
                Shiv_Kumar
                My 1.4MB app continues to swing between 437KB and 1.4MB. As time goes on I'm adding more code but I've seen the size of the app drop then go up then drop again, just completely randomly.