Flex 4.5 - to long build process

后端 未结 3 1617
庸人自扰
庸人自扰 2020-12-07 05:04

We are developing an app using flex 4.5. The app runs just fine (no performance issues at all) but it takes us forever to compile and build it. A minor change, like just add

相关标签:
3条回答
  • 2020-12-07 05:44

    Ok, This is how we fixed it:

    1. We deleted all the dependencies. Then, we added only the necessary ones. You won't believe how many SWC files were just there and never used.

    2. We went through almost every action-script and mxml file, and deleted unnecessary imports (using CTRL+ O on eclipse). This is a lot of work.

      1. We changed the buiders on the project configurations so that only Flex builder remains. There were more builders including Maven. Every builder makes everything slower.

    That is it.

    0 讨论(0)
  • 2020-12-07 05:58

    Summary

    • Turn off auto-build
    • Close unrelated projects
    • Remap Ctrl+B
    • Encapsulate application domains

    Turn off auto-build

    First thing to do when you install FlashBuilder is turning off the automatic building "feature". The Flex compiler is waaay to slow to constantly build in the background unless you work on very small projects. It's in menu > Project > Build Automatically.

    enter image description here

    Close unrelated projects

    Any open project eats away memory. Close as many as you can.

    Remap Ctrl+B

    Since you use the Ctrl+B keybinding to launch the build process, you should know that this will actually build your entire workspace. Every single project that is open will be built. When you have a lot of dependencies that's gonna take a whole lot of time.

    That's why I remap the Ctrl+B combo to just build the project that I'm currently working on. A small donwside is that sometimes you have to go 'manually' build a few projects, but that's largely outweighed by the time gain.

    Go to menu > Window > Preferences. Type "key" in the search box. Click the topic "keys" under "general". Now type "build" in the searchbox on the right. Select "Build Automatically" and click the "Unbind Command" button. The ctrl+B binding should disappear. Now select "Build Project", then select the "Binding" input field (lower left) and hit Ctrl+B. Save and you're done.

    enter image description here

    Encapsulate application domains

    I don't have a single project that is bigger than 200 files (usually even less than 100). Since your project consists of 1300 files I assume that it is does not have one monolithic function. So you should be able to slice it up into separate libraries; preferably one for each application domain. This will allow you to compile sizeable bits of the application and has the added benefit of clearly separating some concerns within your application.

    0 讨论(0)
  • 2020-12-07 06:01

    How to fix slow build time when trying to use the debugger on Flash Builder 4.6 Mobile Apps

    I ran into the same problem. Here is how you fix it.

    It seem when you build a mobile app with a Server Connection like PHP it writes all of the files on the server Directory..

    When it come time to compile the app to debug it packages all of the sitting in the server directory. To fix this issue do the following.

    • Properties of the project.
    • Flex Build Packaging
    • for this example Pick Google Android.

    Package Contents. UnSelect anything that does not belong in your project..

    After doing this build time when from 30 minutes to under 10 seconds..

    0 讨论(0)
提交回复
热议问题