views:

41

answers:

4

I've noticed that, recently, builds in FlexBuilder have been taking much, much longer than they used to (30 or 40 seconds, as opposed to 3 or 4). What is the simplest way of profiling these builds to figure out what is taking so much time?

+1  A: 

Did you try cleaning your project? ( Project--> Clean )

From the Adobe Live Docs: Performing a clean build

After a project has been built, subsequent builds affect only the resources that have been added  
or modified. To force the Flex Builder compiler to rebuild all resources in a project, you can 
perform a clean build. You might perform a clean build if, for example, you want to eliminate all 
potential sources of a problem you encountered when testing your application.

    1. Select Project > Clean from the main menu.
    2. Select the project (or projects) whose build files you want to discard and rebuild from scratch.
    3. Click OK.
Bryan Clover
It sounds like that will cause it to take longer. At least for the initial rebuild.
ablerman
+1  A: 

I have found that when Flex Builder reaches a java heap space of, say 500M, the builds slows way down, try restarting Flex Builder whenever that happens. Also, add the heap monitor to the status bar by going to Window->Preferences, type "heap space" in the filter and check the box that says "Show heap status".

I've also found that embeds slows the builds down very much, so does having a lot of stuff in your html-template folder. I suggest moving all embeds to a separate module, like described here.

Evenrything in your html-template folder will get copied to bin-debug during build, so that will be slow too. How to solve this depends on your project, but removing any .svn or .cvs folders from html-template is a start.

Markus Johnsson
+1  A: 

FlashBuilder is just an eclipse and eclipse is Java. You can profile eclipse itself with JProfiler. so much for the first question. To trakc down, waht actually makes the build process so slow is much harder and profiling may not be what you want. Additionally to the adives above, there is also the

-incremental=true

compiler argument. Make sure your "-Xms" entry equals your "-Xmx" entry.

And there's more than heap. You can also set the -XX:PermSize= and -XXMaxPermSize= parameters wisely. But that would need some understanding of the GC process, as the ratio between heap and permspace is crucial here.

And if you play with these variables, always make sure they are actually used. It happens more than easy to put them somewhere (batch file, exlipse.ini) with them having any effect.

cboese