我通过Flex构建路径/源路径添加了类目录,现在'建筑工作区'永远是永远 [英] I added class directory via Flex Build Path/Source Path, and now 'building workspace' takes forever

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

问题描述



我有一个目录,AS3_classes_dir,在我的电脑上存储我的所有类,包括我的greensock和papervision包。在我使用的每个 flash 应用程序中,我将源目录中包含该目录,以便我可以导入我可能需要的任何东西。在flash中编译(使用ctrl / enter)需要很少的时间;只有具体导入的类才被编译。



所以今天我在flashbuilder中做了这个,通过Flex Build Path / Source Path包含了AS3_classes_dir。 ..但现在的编译时间是几分钟,即使我甚至没有从内部导入任何类。



我没有任何其他项目打开

解决方案

FlashBuilder和Flash Pro之间的巨大区别在于前者将加载所有班进入记忆这对于代码提示(或智能感知),IDE中的自动导入和警告/错误消息(以及可能还有一些我现在没有想到的功能)是必需的,如果您使FB总是加载所有类你可能有,那么你一定会打一个记忆墙。



因为有一个大项目与你所有的课程根本不是一个好办法,从可维护性的角度来看(在一个团队中,这是一个噩梦),但是这是一个不同的讨论,所以我认为你应该重新考虑它,请注意,我明白你不愿意这样做,但从长远来看,它会所以你应该做的第一件事就是将这个巨大的项目削减成可以自己承担的小件(图书馆项目)。然后将您所需的依赖关系链接到主项目中,主要项目中有两个主要的方法来连接其他项目,在项目中ct属性,转到Flex库构建路径并选择库路径选项卡。




  • '添加项目...'您从FlashBuilder工作区添加另一个项目。如果要在主项目上工作时对依赖项目进行大量更改,请使用此选项。请注意,这比其他选项慢,因为依赖项目在每次编译主项目时都会被编译。

  • '添加SWC文件夹...'和'添加SWC ... '可以添加已编译的库。如果依赖项目相对稳定并且几乎不会改变,请使用此选项。



我希望这是足够的信息让您开始组织你的项目。我也为类似的问题写了一个答案,并提出了一些可能对您有帮助的表现和组织提示: Flex 4.5 - 长期构建过程


I am coming from flash to flashbuilder.

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.

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.

解决方案

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.

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'.

  • 'Add project...' lets you add another project from your FlashBuilder workspace. Use this option if you're going to make a lot of changes to the dependency project while working on the main project. Note that this is slower than the other option, because the dependency project gets compiled every time the main project is compiled.
  • 'Add SWC folder...' and 'Add SWC...' lets you add already compiled libraries. Use this option if the dependency project is relatively stable and will hardly ever change.

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构建路径/源路径添加了类目录,现在'建筑工作区'永远是永远的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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