Flex 4.5 - 长时间的构建过程 [英] Flex 4.5 - to long build process

查看:155
本文介绍了Flex 4.5 - 长时间的构建过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用flex 4.5开发一个应用程序。该应用程序运行得很好(根本没有性能问题),但需要我们永远编译和构建它。一个小小的变化,就像添加一个注释或按下mxml文件中的输入,重建大约需要3分钟。你只是不能这样工作。

这是一个大约1300个文件的大项目。我们也使用欧芹作为国际奥委会容器和cairngorm导航节拍。我们也使用Maven(Flex mojos),但是我正在讨论一个正常的eclipse构建(Ctrl + B)。我们把一些代码分离到了一个不同的SWC,我们的图形存储在不同的资源SWF中。

请问,你有什么建议?

问候,Ido

解决方案

摘要 build

  • 关闭无关项目

  • 重新映射Ctrl + B

  • 封装应用程序域



    关闭自动构建



    安装FlashBuilder时,首先要关闭自动构建功能。 Flex编译器是waaay减慢,不断建立在后台,除非你在非常小的项目工作。它在菜单>项目>自动生成。


    $ b

    关闭不相关的项目



    任何打开的项目都会消耗内存。关闭尽可能多的。



    重映射Ctrl + B



    使用Ctrl + B键绑定启动构建过程,您应该知道这实际上是构建您的整个工作区。每一个打开的项目都将被建立。当你有很多的依赖需要花费很多时间。

    这就是为什么我重新映射Ctrl + B组合来构建我目前的项目工作。一个小小的缺点是,有时你必须手动建立一些项目,但是时间的增加大大超过了这个项目。



    转到菜单>窗口>首选项。在搜索框中输入key。点击常规下的键主题。现在在右侧的搜索框中输入build。选择自动构建,然后单击取消绑定命令按钮。 ctrl + B绑定应该消失。现在选择生成项目,然后选择绑定输入字段(左下角),然后按Ctrl + B。保存完成。





    封装应用程序域

    我没有一个项目那大于200个文件(通常甚至不到100个)。由于你的项目包含1300个文件,我假设它没有一个单一的函数。所以你应该能够把它分成不同的库;优选每个应用程序域一个。这将使您能够编译大量的应用程序,并有额外的好处,清楚地分开您的应用程序中的一些问题。

    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 a comment or press enter in an mxml file and rebuild takes about 3 minutes. You just cant work that way.

    It is a large project with about 1300 files. We also use Parsley as IOC container and a beat of cairngorm navigation. We also use Maven (Flex mojos) but I am talking about a normal eclipse build (Ctrl + B).

    We separated some of the code to a different SWC and all of our graphics are stored in a different resource SWF.

    Please, Do you have any suggestions?

    Regards, Ido

    解决方案

    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.

    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.

    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.

    这篇关于Flex 4.5 - 长时间的构建过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆