我通过Flex Build Path/Source Path添加了类目录,现在' build工作区'永远需要 [英] I added class directory via Flex Build Path/Source Path, and now 'building workspace' takes forever

查看:70
本文介绍了我通过Flex Build Path/Source Path添加了类目录,现在' build工作区'永远需要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从Flash转到Flashbuilder.

I am coming from flash to flashbuilder.

我的计算机上有一个目录AS3_classes_dir,用于存储我的所有课程,包括我的greensock和papervision软件包.在我制作的每个 flash 应用程序中,我都将该目录包括在源路径"中,以便可以导入所需的任何内容.在Flash中编译(使用ctrl/enter)只需要很少的时间.仅编译专门导入的类.

I have a directory, AS3_classes_dir, on my computer that stores all of my classes, including my greensock and papervision packages. In every flash app that I make I include that directory in the Source Path, so that I can import whatever I may need. Compiling in flash (using ctrl/enter) takes very little time; only the classes that are specifically imported are compiled.

所以今天我在 flashbuilder 中做到了这一点,它通过Flex Build Path/Source Path包含了AS3_classes_dir ...但是现在编译时间只有几分钟,即使我什至都不导入任何内部的课程.

So today I did that in flashbuilder, included AS3_classes_dir via Flex Build Path/Source Path ... but now the compile time are a couple of minutes, even though I am not even importing ANY of the classes from within.

我没有打开任何其他项目.

I do not have any other projects open.

推荐答案

FlashBuilder和Flash Pro之间的最大区别是,前者会将 all 所引用的类加载到内存中.这对于代码提示(或智能感知),自动导入以及IDE中的警告/错误消息正常工作(以及可能我现在不在考虑的其他功能)是必不可少的.如果使FB始终加载所有类,你可能有,那么你注定要撞上记忆墙.

The big difference between FlashBuilder and Flash Pro is that the former will load all the referenced classes into memory. This is necessary for the code hinting (or intellisense), the automatic imports and the warning/error messages in the IDE to work (and probably some other functionalities that I'm not thinking of right now. If you make FB always load all classes you possibly have, then you're bound to hit a memory wall.

因此,对所有班级都有一个大项目根本不是一个好方法.从可维护性的角度来看,这也不是问题(对于团队而言,这将是一场噩梦),但这是另一回事.因此,我认为您应该重新考虑它.请注意,我知道您不愿意这样做,但从长远来看,它将使您的依赖项更加有条理.

Therefor having one big project with all your classes is simply not a good approach. It also isn't from a maintainability point of view (in a team it would be a nightmare), but that's a different discussion. So I think you should reconsider it. Note that I understand your reluctance to do so, but in the long run it'll pay off to keep your dependencies more organized.

因此,您应该做的第一件事是将大型项目切成可以独立存在的较小部分(库项目),然后仅将所需的依赖项链接到主项目中.在主项目中链接其他项目有两种主要方法.在项目属性中,转到"Flex库构建路径",然后选择选项卡库路径".

So the first thing you should do, is cutting that huge project into smaller pieces (library projects) that can stand on their own and then link only the dependencies you need into the main project. There are two main ways to link other projects in your main project. In the project properties, go to 'Flex library build path' and select the tab 'Library path'.

  • 添加项目..."使您可以从FlashBuilder工作区添加另一个项目.如果要在处理主项目时对依赖项项目进行大量更改,请使用此选项.请注意,这比其他选项要慢,因为依赖项项目是在每次编译主项目时都进行编译的.
  • 添加SWC文件夹..."和添加SWC ..."可让您添加已编译的库.如果依赖项项目相对稳定并且几乎不会更改,请使用此选项.

我希望这是足够的信息,可以帮助您开始组织项目.我还针对类似的问题写了另一个答案,其中包含一些性能和组织技巧,可能会对您有所帮助:

I hope this is enough info to get you started organizing your projects. I have also written another answer on a similar question with some performance and organizational tips that might be helpful to you: Flex 4.5 - to long build process

这篇关于我通过Flex Build Path/Source Path添加了类目录,现在' build工作区'永远需要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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