热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

有关加快FlexBuilder3中编译时间的建议吗?-AnyadviceforspeedingupthecompiletimeinFlexBuilder3?

IrunFlexBuilder3onamacandasmyprojectgrows-thecompiletimegetslongerandlongerand

I run Flex Builder 3 on a mac and as my project grows - the compile time gets longer and longer and longer. I am using some SWC's and there is a fair amount of code but it shouldn't take minutes to build and crash daily should it?

我在Mac上运行Flex Builder 3,随着项目的增长 - 编译时间越来越长。我正在使用一些SWC并且有相当数量的代码但是它应该不需要花费几分钟来构建并且每天都会崩溃吗?

14 个解决方案

#1


5  

In addition to the suggestions already mentioned, close any projects that you have open that you are not using.

除了已经提到的建议之外,请关闭您未打开的任何项目。

Rich click on the Project in the Navigator view and select "Close Unrelated Projects".

在Navigator视图中单击Project,然后选择“Close Unrelated Projects”。

Depending on how many projects you have open, this can lead to a significant improvements in compile time, as well as all around performance.

根据您打开的项目数量,这可以显着改善编译时间以及所有性能。

mike chambers

mesh@adobe.com

#2


10  

First of all, comments on some of the response:

首先,对一些回复的评论:

  1. There is no need to explicitly specify -incremental in Flex Builder because it uses incremental compilation by default.

    无需在Flex Builder中明确指定-incremental,因为它默认使用增量编译。

  2. -keep-generated-actionscript is a performance killer because it instructs the compiler to write out AS3 codes generated for MXML components in the middle of the compilation. File I/O in the middle of a compilation means unnecessary pauses and low CPU utilizations.

    -keep-generated-actionscript是一种性能杀手,因为它指示编译器在编译过程中写出为MXML组件生成的AS3代码。编译过程中的文件I / O意味着不必要的暂停和低CPU利用率。

  3. -optimize slows down linking because it instructs the linker to produce smaller SWFs. Note that -optimize=true|false doesn't have any effect on building SWCs because SWCs are libraries and have to be unoptimized.

    -optimize减慢链接速度,因为它指示链接器生成较小的SWF。请注意,-optimize = true | false对构建SWC没有任何影响,因为SWC是库,必须不优化。

  4. I rarely mess with JVM settings because JVM knows its jobs well and tunes itself quite well at runtime. Most people make matter worse by setting various GC tuning parameters. That said, there are 3 settings most people understand and set correctly for their usage:

    我很少搞乱JVM设置,因为JVM很好地了解它的工作并且在运行时很好地调整自己。大多数人通过设置各种GC调整参数使事情变得更糟。也就是说,大多数人都了解并正确设置了3种设置:

-Xmx (max heap size)

-Xmx(最大堆大小)

-server or -client (HotSpot Server or Client VM)

-server或-client(HotSpot服务器或客户端VM)

-XX:+UseSerialGC or -XX:+UseParallelGC (or other non-serial GC)

-XX:+ UseSerialGC或-XX:+ UseParallelGC(或其他非串行GC)

-server consistently outperforms -client by about 30% when running the Flex compiler. -XX:+UseParallelGC turns on the parallel garbage collector. ideal for multicore computer and when the computer still has CPU cycles to spare.

运行Flex编译器时,-server始终优于-client约30%。 -XX:+ UseParallelGC打开并行垃圾收集器。适用于多核计算机,当计算机仍有CPU周期时。

You may also want to check out HellFire Compiler Daemon (http://bytecode-workshop.com/). It uses multiple processor cores to compile multiple Flex applications at the same time. You can also run the compiler on a second machine via sockets (assuming that your second machine has faster CPUs and more memory).

您可能还想查看HellFire Compiler Daemon(http://bytecode-workshop.com/)。它使用多个处理器内核同时编译多个Flex应用程序。您还可以通过套接字在第二台计算机上运行编译器(假设您的第二台计算机具有更快的CPU和更多内存)。

In my opinion, use more modules than libraries and use HFCD.

在我看来,使用比库更多的模块并使用HFCD。

Hope this helps.

希望这可以帮助。

-Clement

#3


9  

There's no need to use mxmlc on the command line just to be able to add compiler flags. Right click your project in the Flex Navigator, select Properties and then Flex Compiler in the dialog that appears. There you can add any extra compiler flags.

为了能够添加编译器标志,不需要在命令行上使用mxmlc。在Flex Navigator中右键单击您的项目,在出现的对话框中选择Properties,然后选择Flex Compiler。你可以添加任何额外的编译器标志。

Not sure that there's very much to do though, more code means more compile time, that's just the way it is. If you're not doing a release build (or whatever it's called in Flex Builder) it's unlikely that your compiler settings include optimize to begin with. Better choices to try would be -incremental (which only recompiles the parts that have changed) and -keep-generated-actionscript (which stops the compiler from deleting the ActionScript files it has generated from your application's MXML files).

不确定是否有很多工作要做,更多的代码意味着更多的编译时间,这就是它的方式。如果您没有进行发布构建(或者在Flex Builder中调用它),那么您的编译器设置不太可能包括优化。更好的选择是-incremental(只重新编译已更改的部分)和-keep-generated-actionscript(它阻止编译器删除它从应用程序的MXML文件生成的ActionScript文件)。

I very much prefer using mxmlc on the command line (by way of Ant) compared to Flex Builder. Although I don't think that the latter compiles any slower, it feels more sluggish in every way. Using Ant also makes it possible to do more than just compilation when building, and conditional compilation (only compile a SWF or SWC if the source code has actually changed). Check out a blog post of mine for more info on that.

与Flex Builder相比,我更喜欢在命令行上使用mxmlc(通过Ant)。虽然我不认为后者编程速度较慢,但​​在各方面都感觉更加迟钝。使用Ant还可以在构建和条件编译时完成编译(如果源代码实际已更改,则只编译SWF或SWC)。查看我的博客文章了解更多相关信息。

What you could try is the Flex Compiler Shell, another command line tool that can speed things up. Basically it tries to keep as much as possible in memory between builds, so no need to wait for things like the JVM starting up (the Flex compiler is a Java application). On the other hand this is sort of what Flex Builder does anyway.

您可以尝试的是Flex Compiler Shell,这是另一个可以加快速度的命令行工具。基本上它试图在构建之间尽可能多地保留在内存中,因此不需要等待JVM启动这样的事情(Flex编译器是Java应用程序)。另一方面,这就是Flex Builder所做的一切。

#4


4  

Slow compile time is most often caused by having large numbers of embedded resources ([Embed] or @Embed).

编译时间慢通常是由于拥有大量嵌入资源([Embed]或@Embed)造成的。

Option 2 on this article might help you: [http://www.rogue-development.com/blog2/2007/11/slow-flex-builder-compile-and-refresh-solution-modules/]

本文的选项2可能对您有所帮助:[http://www.rogue-development.com/blog2/2007/11/slow-flex-builder-compile-and-refresh-solution-modules/]

#5


4  

I created RAM Disk with workspace and it gives up to 10% of better compilation time. Not much, but something.

我创建了带工作空间的RAM磁盘,它可以提供高达10%的更好的编译时间。不多,但有些东西。

#6


2  

You want at least 4 gigs on your computer if possible, and make sure to override the default memory settings that eclipse/flexbuilder gives to the application.

如果可能,您希望计算机上至少有4场演出,并确保覆盖eclipse / flexbuilder为应用程序提供的默认内存设置。

If you're not sure how to do this, you can find the flexbuilder app in /Applications, right click and choose "Show Package Contents". Then go into the contents file and edit the eclipse.ini file. Edit that file have memory settings of at least:

如果您不确定如何执行此操作,可以在/ Applications中找到flexbuilder应用程序,右键单击并选择“显示包内容”。然后进入内容文件并编辑eclipse.ini文件。编辑该文件的内存设置至少为:

-vmargs -Xms768m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=128m 

It's also worthwhile to go into the eclipse/flexbuilder preferences and to check the "Show heap status" box under Windows->Preferences->General (This is in eclipse with the FB plugin, I'm assuming it's also there for standalone FB).

进入eclipse / flexbuilder首选项并检查Windows-> Preferences-> General下的“显示堆状态”框也是值得的(这是在使用FB插件的eclipse中,我假设它也适用于独立的FB) 。

This shows the current memory in the lower right of the window and has a little trash icon so you can force garbage collection.

这显示了窗口右下角的当前内存,并且有一个垃圾桶图标,因此您可以强制进行垃圾回收。

I'd also suggest turning off automatic building of the project when your files change (you can force a build with cmd-B).

我还建议在文件更改时关闭项目的自动构建(您可以使用cmd-B强制构建)。

We had a huge project with quite a few modules files and performance in FlexBuilder 3 was decent with these steps.

我们有一个包含相当多模块文件的庞大项目,FlexBuilder 3中的性能与这些步骤相当不错。

#7


1  

Go to Project->Properties->Flex Applications. All of the applications listed are compiled each time (even though you have a default set). If you remove everything but the default (don't worry, it won't delete the actual files), it only compiles the default app. This resulted in a significant speed up for me. If you change your default app, it ADDs it to the Flex Applications list - adding to your compile time. You will need to maintain this list to get the quickest compile.

转到项目 - >属性 - > Flex应用程序。每次列出的所有应用程序都会被编译(即使您有默认设置)。如果删除除默认值之外的所有内容(不用担心,它不会删除实际文件),它只会编译默认应用程序。这导致了我的显着加速。如果更改默认应用程序,则会将其添加到Flex应用程序列表 - 添加到编译时。您需要维护此列表以获得最快的编译。

#8


1  

I always disable "automatic compile" for Flex. It compiles too much, takes too long, and so interrupts my work.

我总是禁用Flex的“自动编译”。它汇编太多,耗时太长,因此打断了我的工作。

If you have many different project files and all of those needs to be recompiled, but you also have other projects open and don't want to close them always you're doing a build, you can also use Eclipse Working Sets.

如果您有许多不同的项目文件,并且所有这些都需要重新编译,但是您还打开了其他项目并且不想关闭它们,那么您也可以使用Eclipse工作集。

Unfortunately, the default Flex Navigator does not support working sets. But you can open the Package Explorer with Window / Show View / .... Click on the little white downward arrow to the topright and select Top Level Elements: Working Sets. You can then add Working Sets (aka groups of projects). Each project needs to be in at least one working set ("Other Projects" being the default), but can be in several.

不幸的是,默认的Flex Navigator不支持工作集。但是您可以使用Window / Show View /打开Package Explorer。点击顶部的小白色向下箭头,然后选择顶级元素:工作集。然后,您可以添加工作集(也称为项目组)。每个项目都需要至少有一个工作集(默认为“其他项目”),但可以有几个。

Now with Project / Build Working Set / ... you can instruct Eclipse to build all the projects in this working set, but none of the others. This is especially useful if you suspect your project references to be sometimes broken - otherwise building the 'topmost' project should trigger subsequent builds automatically.

现在有了Project / Build Working Set / ...你可以指示Eclipse在这个工作集中构建所有项目,但没有其他项目。如果您怀疑项目引用有时会被破坏,这将非常有用 - 否则构建“最顶层”项目应该会自动触发后续构建。

#9


1  

As Clement said, use the HellFire Compiler Daemon. If you have multiple modules and more CPU cores on your machine it can compile them in parallel. Another option is to use IntelliJ (the commercial version) which offers the same feature.

正如Clement所说,使用HellFire编译器守护进程。如果您的计算机上有多个模块和更多CPU核心,它可以并行编译它们。另一种选择是使用提供相同功能的IntelliJ(商业版)。

#10


1  

The SDK 4.x.x introduced silly bug (see Adobe bugsystem, issue FB-27440), which causes projects with SVN or CVS meta data compile much slower than with SDK 3.x.x. On how it can be fixed, see here.

SDK 4.x.x引入了愚蠢的bug(参见Adobe bugsystem,问题FB-27440),这导致使用SVN或CVS元数据编译的项目比使用SDK 3.x.x慢得多。关于它是如何修复的,请看这里。

#11


0  

You may want to explore the command-line compiler found in the Flex SDK, mxmlc. As I recall, Flex Builder 3 seems to hide all the compiler details, but perhaps there are arguments you can append that will help you speed up the compilation.

您可能希望探索Flex SDK中的命令行编译器mxmlc。我记得,Flex Builder 3似乎隐藏了所有编译器的细节,但也许你可以附加的参数可以帮助你加速编译。

For example, you may want to set optimize=false which will skip the step of optimizing the bytecode (perhaps reducing compilation time)? This of course comes at the price of performance and file size of the actual application.

例如,您可能想设置optimize = false,这将跳过优化字节码的步骤(可能减少编译时间)?这当然是以实际应用程序的性能和文件大小为代价的。

More documentation on mxmlc can be found at: http://livedocs.adobe.com/flex/3/html/compilers_13.html.

有关mxmlc的更多文档,请访问:http://livedocs.adobe.com/flex/3/html/compilers_13.html。

Good luck!

#12


0  

I don't use Flex Builder, but I use the Flex SDK compiler everyday and I was wasting tons of time waiting for the MXMLC compiler to do its job until I found Flex Compiler SHell:

我不使用Flex Builder,但是我每天都使用Flex SDK编译器,在找到Flex Compiler SHell之前,我浪费了大量时间等待MXMLC编译器完成其工作:

http://blog.zarate.tv/2008/12/07/theres-something-called-flex-compiler-shell/

Although in theory Flex Builder already uses this optimizations, might be worth checking.

虽然理论上Flex Builder已经使用了这种优化,但值得检查。

#13


0  

You can use WORKING SETS to compile just a set of your components that are part of the application that you are changing and not the whole project

您可以使用WORKING SETS编译一组组件,这些组件是您要更改的应用程序的一部分,而不是整个项目

http://livedocs.adobe.com/flex/3/html/help.html?cOntent=build_6.html

#14


-1  

Usually the first build takes the longest, and then it's pretty quick after that. That's using Vista x64 w/ core 2 duo.

通常第一次构建时间最长,之后很快就会很快。那是使用Vista x64 w / core 2 duo。

Otherwise, I am nearly certain a Intel Core i7 Extreme Edition 965 3.2GHz upgrade processor would speed your Flex building up nicely .. :) :) :)

否则,我几乎肯定英特尔酷睿i7至尊版965 3.2GHz升级处理器会加速你的Flex建立得很好.. :) :) :)


推荐阅读
  • JDK源码学习之HashTable(附带面试题)的学习笔记
    本文介绍了JDK源码学习之HashTable(附带面试题)的学习笔记,包括HashTable的定义、数据类型、与HashMap的关系和区别。文章提供了干货,并附带了其他相关主题的学习笔记。 ... [详细]
  • 先看官方文档TheJavaTutorialshavebeenwrittenforJDK8.Examplesandpracticesdescribedinthispagedontta ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 本文介绍了设计师伊振华受邀参与沈阳市智慧城市运行管理中心项目的整体设计,并以数字赋能和创新驱动高质量发展的理念,建设了集成、智慧、高效的一体化城市综合管理平台,促进了城市的数字化转型。该中心被称为当代城市的智能心脏,为沈阳市的智慧城市建设做出了重要贡献。 ... [详细]
  • android listview OnItemClickListener失效原因
    最近在做listview时发现OnItemClickListener失效的问题,经过查找发现是因为button的原因。不仅listitem中存在button会影响OnItemClickListener事件的失效,还会导致单击后listview每个item的背景改变,使得item中的所有有关焦点的事件都失效。本文给出了一个范例来说明这种情况,并提供了解决方法。 ... [详细]
  • eclipse学习(第三章:ssh中的Hibernate)——11.Hibernate的缓存(2级缓存,get和load)
    本文介绍了eclipse学习中的第三章内容,主要讲解了ssh中的Hibernate的缓存,包括2级缓存和get方法、load方法的区别。文章还涉及了项目实践和相关知识点的讲解。 ... [详细]
  • 在Xamarin XAML语言中如何在页面级别构建ControlTemplate控件模板
    本文介绍了在Xamarin XAML语言中如何在页面级别构建ControlTemplate控件模板的方法和步骤,包括将ResourceDictionary添加到页面中以及在ResourceDictionary中实现模板的构建。通过本文的阅读,读者可以了解到在Xamarin XAML语言中构建控件模板的具体操作步骤和语法形式。 ... [详细]
  • Iamtryingtocreateanarrayofstructinstanceslikethis:我试图创建一个这样的struct实例数组:letinstallers: ... [详细]
  • 本文介绍了在go语言中利用(*interface{})(nil)传递参数类型的原理及应用。通过分析Martini框架中的injector类型的声明,解释了values映射表的作用以及parent Injector的含义。同时,讨论了该技术在实际开发中的应用场景。 ... [详细]
  • 深入理解Java虚拟机的并发编程与性能优化
    本文主要介绍了Java内存模型与线程的相关概念,探讨了并发编程在服务端应用中的重要性。同时,介绍了Java语言和虚拟机提供的工具,帮助开发人员处理并发方面的问题,提高程序的并发能力和性能优化。文章指出,充分利用计算机处理器的能力和协调线程之间的并发操作是提高服务端程序性能的关键。 ... [详细]
  • Jquery 跨域问题
    为什么80%的码农都做不了架构师?JQuery1.2后getJSON方法支持跨域读取json数据,原理是利用一个叫做jsonp的概念。当然 ... [详细]
  • linux进阶50——无锁CAS
    1.概念比较并交换(compareandswap,CAS),是原⼦操作的⼀种,可⽤于在多线程编程中实现不被打断的数据交换操作࿰ ... [详细]
  • 本文介绍了在实现了System.Collections.Generic.IDictionary接口的泛型字典类中如何使用foreach循环来枚举字典中的键值对。同时还讨论了非泛型字典类和泛型字典类在foreach循环中使用的不同类型,以及使用KeyValuePair类型在foreach循环中枚举泛型字典类的优势。阅读本文可以帮助您更好地理解泛型字典类的使用和性能优化。 ... [详细]
  • 一条数据的漫游 XEngine SIGMOD Paper Introduction
    大多数人追寻永恒的家园(归宿),少数人追寻永恒的航向。----瓦尔特.本雅明背景X-Engine是阿里数据库产品事业部自研的OLTP数据库存储引擎, ... [详细]
  • 与其说是问题不如说是文档。这是关于无法构建的virtualbox6.1.10、Ubuntu20.04和virtualbox-dkms包失败apt-ge ... [详细]
author-avatar
兄弟465748208_279
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有