Flex 4.5 - to long build process

后端 未结 3 1627
庸人自扰
庸人自扰 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: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.

提交回复
热议问题