<p>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?</p>

[{'answer_id': 34017, 'author': 'jcsalterego', 'author_id': 1416, 'author_profile': 'https://Stackoverflow.com/users/1416', 'pm_score': 0, 'selected': False, 'text': '<p>You may want to explore the command-line compiler found in the Flex SDK, <code>mxmlc</code>. 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.</p>\n\n<p>For example, you may want to set <code>optimize=false</code> 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.</p>\n\n<p>More documentation on <code>mxmlc</code> can be found at: <a href="http://livedocs.adobe.com/flex/3/html/compilers_13.html" rel="nofollow noreferrer">http://livedocs.adobe.com/flex/3/html/compilers_13.html</a>.</p>\n\n<p>Good luck!</p>\n'}, {'answer_id': 34372, 'author': 'Richard Szalay', 'author_id': 3603, 'author_profile': 'https://Stackoverflow.com/users/3603', 'pm_score': 2, 'selected': False, 'text': '<p>Slow compile time is most often caused by having large numbers of embedded resources ([Embed] or @Embed).</p>\n\n<p>Option 2 on this article might help you: [<a href="http://www.rogue-development.com/blog2/2007/11/slow-flex-builder-compile-and-refresh-solution-modules/]" rel="nofollow noreferrer">http://www.rogue-development.com/blog2/2007/11/slow-flex-builder-compile-and-refresh-solution-modules/]</a></p>\n'}, {'answer_id': 34583, 'author': 'Theo', 'author_id': 1109, 'author_profile': 'https://Stackoverflow.com/users/1109', 'pm_score': 3, 'selected': False, 'text': '<p>There\'s no need to use <code>mxmlc</code> 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. </p>\n\n<p>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 <code>optimize</code> to begin with. Better choices to try would be <code>-incremental</code> (which only recompiles the parts that have changed) and <code>-keep-generated-actionscript</code> (which stops the compiler from deleting the ActionScript files it has generated from your application\'s MXML files).</p>\n\n<p>I very much prefer using <code>mxmlc</code> 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 href="http://blog.iconara.net/2008/02/22/quick-tips-to-speed-up-your-ant-build/" rel="noreferrer">a blog post of mine</a> for more info on that.</p>\n\n<p>What you could try is the <a href="http://labs.adobe.com/wiki/index.php/Flex_Compiler_Shell" rel="noreferrer">Flex Compiler Shell</a>, 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.</p>\n'}, {'answer_id': 67704, 'author': 'mikechambers', 'author_id': 10232, 'author_profile': 'https://Stackoverflow.com/users/10232', 'pm_score': 4, 'selected': True, 'text': '<p>In addition to the suggestions already mentioned, close any projects that you have open that you are not using.</p>\n\n<p>Rich click on the Project in the Navigator view and select "Close Unrelated Projects".</p>\n\n<p>Depending on how many projects you have open, this can lead to a significant improvements in compile time, as well as all around performance.</p>\n\n<p>mike chambers</p>\n\n<p>mesh@adobe.com</p>\n'}, {'answer_id': 447910, 'author': 'Suzanne ', 'author_id': 55552, 'author_profile': 'https://Stackoverflow.com/users/55552', 'pm_score': 1, 'selected': False, 'text': "<p>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.</p>\n"}, {'answer_id': 449697, 'author': 'Ted Naleid', 'author_id': 8912, 'author_profile': 'https://Stackoverflow.com/users/8912', 'pm_score': 2, 'selected': False, 'text': '<p>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.</p>\n\n<p>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:</p>\n\n<pre><code>-vmargs -Xms768m -Xmx768m -XX:PermSize=128m -XX:MaxPermSize=128m \n</code></pre>\n\n<p>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).</p>\n\n<p>This shows the current memory in the lower right of the window and has a little trash icon so you can force garbage collection.</p>\n\n<p>I\'d also suggest turning off automatic building of the project when your files change (you can force a build with cmd-B).</p>\n\n<p>We had a huge project with quite a few modules files and performance in FlexBuilder 3 was decent with these steps.</p>\n'}, {'answer_id': 449709, 'author': 'Scott Evernden', 'author_id': 11397, 'author_profile': 'https://Stackoverflow.com/users/11397', 'pm_score': -1, 'selected': False, 'text': "<p>Usually the first build takes the longest, and then it's pretty quick after that. That's using Vista x64 w/ core 2 duo. </p>\n\n<p>Otherwise, I am nearly certain a Intel Core i7 Extreme Edition 965 3.2GHz upgrade processor would speed your Flex building up nicely .. :) :) :)</p>\n"}, {'answer_id': 449798, 'author': 'Juan Delgado', 'author_id': 5908, 'author_profile': 'https://Stackoverflow.com/users/5908', 'pm_score': 0, 'selected': False, 'text': '<p>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:</p>\n\n<p><a href="http://blog.zarate.tv/2008/12/07/theres-something-called-flex-compiler-shell/" rel="nofollow noreferrer">http://blog.zarate.tv/2008/12/07/theres-something-called-flex-compiler-shell/</a></p>\n\n<p>Although in theory Flex Builder already uses this optimizations, might be worth checking.</p>\n'}, {'answer_id': 1623700, 'author': 'Stanislav Zayarsky', 'author_id': 196500, 'author_profile': 'https://Stackoverflow.com/users/196500', 'pm_score': 2, 'selected': False, 'text': '<p>I created RAM Disk with workspace and it gives up to 10% of better compilation time. Not much, but something.</p>\n'}, {'answer_id': 1670831, 'author': 'Zefiro', 'author_id': 131146, 'author_profile': 'https://Stackoverflow.com/users/131146', 'pm_score': 1, 'selected': False, 'text': '<p>I always disable "automatic compile" for Flex. It compiles too much, takes too long, and so interrupts my work.</p>\n\n<p>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.</p>\n\n<p>Unfortunately, the default Flex Navigator does not support working sets. But you can open the <em>Package Explorer</em> with <em>Window / Show View / ...</em>. Click on the little white downward arrow to the topright and select <em>Top Level Elements: Working Sets</em>. 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.</p>\n\n<p>Now with <em>Project / Build Working Set / ...</em> 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.</p>\n'}, {'answer_id': 2640091, 'author': 'Clement', 'author_id': 316794, 'author_profile': 'https://Stackoverflow.com/users/316794', 'pm_score': 3, 'selected': False, 'text': '<p>First of all, comments on some of the response:</p>\n\n<ol>\n<li><p>There is no need to explicitly specify -incremental in Flex Builder because it uses incremental compilation by default.</p></li>\n<li><p>-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.</p></li>\n<li><p>-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.</p></li>\n<li><p>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:</p></li>\n</ol>\n\n<p>-Xmx (max heap size)</p>\n\n<p>-server or -client (HotSpot Server or Client VM)</p>\n\n<p>-XX:+UseSerialGC or -XX:+UseParallelGC (or other non-serial GC)</p>\n\n<p>-server consistently outperforms -client by about 30% when running the Flex compiler.\n-XX:+UseParallelGC turns on the parallel garbage collector. ideal for multicore computer and when the computer still has CPU cycles to spare.</p>\n\n<p>You may also want to check out HellFire Compiler Daemon (<a href="http://bytecode-workshop.com/" rel="nofollow noreferrer">http://bytecode-workshop.com/</a>). 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).</p>\n\n<p>In my opinion, use more modules than libraries and use HFCD.</p>\n\n<p>Hope this helps.</p>\n\n<p>-Clement</p>\n'}, {'answer_id': 3486784, 'author': 'Cornel Creanga', 'author_id': 61679, 'author_profile': 'https://Stackoverflow.com/users/61679', 'pm_score': 1, 'selected': False, 'text': '<p>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.</p>\n'}, {'answer_id': 4472347, 'author': 'Jiri Tobisek', 'author_id': 546252, 'author_profile': 'https://Stackoverflow.com/users/546252', 'pm_score': 1, 'selected': False, 'text': '<p>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 <a href="http://yerii.wordpress.com/2010/12/15/why-has-flex-sdk-4-x-x-become-sluggish-for-some-and-how-you-can-get-it-rolling-again/" rel="nofollow">here</a>.</p>\n'}, {'answer_id': 18130008, 'author': 'Mauricio Gracia Gutierrez', 'author_id': 1461862, 'author_profile': 'https://Stackoverflow.com/users/1461862', 'pm_score': 0, 'selected': False, 'text': '<p>You can use <strong>WORKING SETS</strong> to compile just a set of your components that are part of the application that you are changing and not the whole project</p>\n\n<p><strong><a href="http://livedocs.adobe.com/flex/3/html/help.html?content=build_6.html" rel="nofollow">http://livedocs.adobe.com/flex/3/html/help.html?content=build_6.html</a></strong></p>\n'}]
['https://Stackoverflow.com/questions/33768', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3435/']