I have the following configuration:
Sony VAIO SZ
Intel Core 2 Duo 2.1 GHz (T8100)
NVidia 8400M GS
320GB (7200 RPM) HDD
Windows7 Ultimate (6.1.7600)
I'm trying to use Adobe Flash Builder 4 (build 272416) in Trial mode.
I was working for a long time already with the Flex Builder Plug-in 3. Compilation time was always a headache, true, but it still was affordable. But with the Flash Builder 4 production that became so bad that I can't simply use it event to test.
When started form the "clean" workspace, bundled Eclipse and only one project (Flex) is created - everything looks fine. Even if you add a "hello world" pop-up to your application (that's sarcasm, yeah =)
The situation changes dramatically when you have any number (greater than zero of course) of Java projects in your workspace.
Compilation time skyrockets to about 1 - 2 minutes - first (on an empty project created with wizard). Second - it starts crashing with or without reason.
When I'm trying to create a new Flex project (having several Java projects in the workspace) - the moment the wizard is complete and it's going to show me the contents of the newly created MXML (yes, a few lines with no logic at all) it crashes. When I'm trying to open existing project - well, it opens, but compilation times are greater than 2 minutes (that's a tiny project with a few screens with primitive design, three AS classes and two CSS files and one image included) whenever I just put an empty string to even the main MXML.
When I'm trying to switch to design view - it crashes 80% of time. The rest 20% it show "gray field" and bugs UI completely.
When building starts - the only way to avoid it ... well ... go drink a tea. It's impossible to cancel and if I try to cancel it - it hangs forever. Only killing the eclipse process helps.
And, really, 2 minutes of compilation time? Are you serious? It's like, change the line of code, save, wait 2 minutes with 50% chance of observing never-ending activity?
Btw, I've tested the Flash Builder Beta - there were no such problems. Everything was really cool and smooth. Compilation time was even faster than Flex Builder 3. And such a surprise with the production version.
It's all with the JDK 6u14 (yes, I've tested it with the most recent one - 6u18 - the same picture).
So, is there anyone experiencing the same behavior and any hints on how to fix it? It's really annoying especially knowing and waiting to get hands on all those great SDK 4 features.
Are you using a 64-bit JVM? It sounds like you're running Flash Builder Plug-in, so try this:
1) Close Eclipse
2) Open the eclipse.ini file where your eclipse.exe is located
3) Add a new line after "-vmargs" and on that line type "-d32"
4) Restart Eclipse
A 32-bit JRE is required http://www.adobe.com/products/flex/systemreqs/. "-d32" will force your JVM into a 32-bit mode.
You're likely seeing Design view crash because Flash Player support for 64-bit http://kb2.adobe.com/cps/000/6b3af6c9.html.
Alternatively, you can install a 32-bit JVM and assign that to JAVA_HOME.
Please reply if this solution works for you.
Jason San Jose
Software Engineer, Flash Builder
Sorry, my bad for not specifying the environment fully - I'm using 32 bit Windows 7 and the 32-bit JVM as well.
I've tried to play with eclipse launch settings giving it up to 2Gb of max VM memory, but nothing changed. Actually, what I observe when the build process hangs (with whatever eclipse launch settings are) is 50% processor usage and around 480 - 510 Mb memory consumption by the eclipse process.
it looks like the problem is temporarily solved.
The reason was in the following CSS part:
Once I've commented these lines - compilation is taking a few seconds. I'm going to go try fix all other compatibility issues so the project compiles without errors and check if the problem returns. And having this project in my workspace was causing the problems with creation of new projects as well. Looks really weird, but that's how the things are.
Previously this part of code was like
but that's incompatible with the updated SDK version, so I had to change them to the mentioned state. I'll keep testing the Builder behavior with these lines commented and we'll see where it leads.
Btw, do I have some misunderstanding of the SDK 4 concept of dealing with the fonts embedding, or that's just a subject to JIRA issue? =)
Message was edited by: Andrey Stukalenko
I've checked the log file (it has a bit different location per my workspace =)) - I haven't cleared it for a long time already, so it's a mess, but the shorter version looks like following:
!SESSION 2010-03-24 19:59:00.905 -----------------------------------------------
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU
Command-line arguments: -os win32 -ws win32 -arch x86
I think the longer compile times when embedding fonts are sort of to be expected. You're embedding an awful lot of glyphs into your SWF (versus using device fonts or setting an explicit unicode range).
For example, I tried with the following simple example in Flex 4.0:
<?xml version="1.0" encoding="utf-8"?>
applicationComplete="lbl.text = (loaderInfo.bytesTotal / 1024).toFixed(2) + ' KB';">
@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
<s:Label id="lbl" color="red" fontWeight="bold" />
<s:VGroup horizontalCenter="0" verticalCenter="0">
<s:Label text="Calibri regular" />
<s:Label text="Calibri bold" fontWeight="bold" />
<s:Label text="Calibri italic" fontStyle="italic" />
<s:Label text="Calibri bold+italic" fontWeight="bold" fontStyle="italic" />
Now, the .SWF file in my /bin-debug/ folder was pretty large (~1440 KB -- or about 1.4 MB). When I exported a release version of the .SWF using Builder that number dropped down to ~970 KB (or 0.9 MB). Still rather large.
Typically when embedding fonts you'll want to specify a unicode range so you only embed the characters you care about (English uppercase/lowercase, punctuation, numbers, etc). Or you could embed Thai ranges or whatever else you want.
So if I specify the following unicode range for each of the four embed statements, the SWF sizes drop considerably:
/bin-debug/: ~970 KB (67%)
/bin-release/: ~520 KB (53%)
You can find some examples of unicode ranges in the /frameworks/flash-unicode-table.xml file in the Flex SDK. Also, you can specify custom named unicode ranges in your /frameworks/flex-config.xml file:
<!-- Defines ranges that can be used across multiple font-face declarations. -->
<!-- See flash-unicode-table.xml for more examples. -->
<!-- not set -->
And this way you could just specify a unicode-range of "englishRange" instead of having to do U+0020-002F, etc.
Hope that helps,
Peter could you please help me figure out why my install is extremly slow. Your site is awesome by the way, I have been using it for years now. Great job, and thanks for keeping it updated so frequently
I was using FB4 beta 2 for a while (standalone version), and it was actually faster than the final release on my project.
I am on Windows 7 Ultimate - 64 bit, I only have the 32bit JDK installed (JDK 6 update 18).
I have the plugin installed on the PDT version of Galileo 3.52, for some reason on this computer I couldn't get it installed on the classic, it would install, with no errors, but would give me could not load design view errors, with the title of the error messages saying not enough memory. This pc has 8gb ram and a core i7, so that didn't make sense, I tried changing values in the eclipse.ini file for the memory limit, I found that on a thread earlier, but that didn't help. Anyway, I removed that eclipse install, did a new one on the PDT, and its working, but the performance is very slow, when I type it has a huge delay, and to save the project will hang up Eclipse completly for a while. Design view is also very slow. It is almost unusable in source or design view when on my main mxml file.
The main mxml file has about 7k lines of code generated by catalyst, about 1k lines of as up top, a few packages, and an alchemy compiled swc. It is somewhat of a large project, but I would imaging being able to build much larger projects.
When I looked in the C:\Users\Arthur\Adobe Flash Builder 4 Plug-in\.metadata folder it was empty, not even a log directory or file.
I am not getting anything crashing, and there is no fonts being embedded. I do have a 10 second mp3 embedded + graphical assets.
Do you know what my problem could be? Would any other logs show the cause of the problem?
I have 1 % cpu usage, 2.79 gb mem usage, and my eclipse.exe *32 process is consuming approx 517,532k
I remember on FB4 beta 2 standalone, the same app would consume about 760mb memory.
Thank you very much for your help.
Thanks for advice, I'll sure try this solution!!!!!
The question is - why everything was smooth with the Flex Builder 3.5? It was the very same font, with the very same unspecified range. And yes, the file size was around 1Mb, but the compilation was taking acceptable times and, actually, it was progressing smoothly, not like hang for a couple minutes on 5%.
I'm not a Builder expert, I'm more of an SDK guy... But I'd start by looking at your final debug or release SWF file size. If the SWF is really large (embedded images, fonts, assets, sounds, etc) then compile time will suffer since you're trying to build one really large SWF. You may need to look into breaking the app into modules or other techniques of loading other content on-demand rather than using one big SWF.
No, I would not consider that big. But if code hinting is slow also, that may be more of an OS/Builder thing and not really a Flex SDK issue. I have a Windows 7 and Windows XP laptop at work and run Windows 7 Ultimate at home and havent seen any performance problems (although I'm not sure which are running 32 bit vs 64 bit OSes actually).
Hmm. Yeah the code hinting has always been slow when I moved in all the catalyst generated mxml, even on flash builder beta 2, on this workstation and another that was a quad core non i7. Generally the code hinting is slower than FB3 plugin on 3.42 pdt europa all around.
Does standalone have better performance than plugin?
Does increasing the vm size in the eclipse.ini have any benefit?
What would you suggest I do assuming its a Os/Builder issue? First steps? Its a fairly new install (os), not much on it.
Also, I'd watch your task manager and keep an eye on your CPU and memory. I found the other day that some Windows firewall/antivirus process would continually spawn for no good reason at random points and take out half my CPU and a bunch of memory, which caused a pretty significant OS slowdown.
Oh, and I wasn't always running Eclipse/Builder when the above happened, so I'm not saying it's related to Builder in any way. Just saying that for performance issues the Windows Task Manager is a pretty good starting point to see what is happening.
Sorry for arriving late here. Just skimmed the updates and it sounds like you installed FB into an external (non-bundled) Eclipse distribution. When you do this, you don't get the optimizations that the FB installer adds to the eclipse.ini file. By default, Eclipse's max memory heap size is 256 MB. To change this, follow the instructions here http://blogs.adobe.com/jasonsj/2010/02/improving_compiler_performance. html to enable Eclipse to use more memory.
Try it out and let us know if you have any other problems.
Jason San Jose
Software Engineer, Flash Builder
No worries on the delay, thanks for chiming in to help ,
Are those the only optimizations? I did make a change, it helped for when I do a save, but the code hinting is still delayed, when I hit a colon for example after a variable name to declare the type, I kinda expect it to suggest, but then it hangs up for a few seconds, and I just end up typing it faster than waiting for the code hinting, I don't have the help pane open at all, I set the max heap size to 1024mb.
You see an initial hit the first time you ask for code hints. After that, results are cached. If you're still seeing performance problems after that initial hit, I'd want to get some more data:
1) Does this problem reproduce in a clean workspace and simple project
2) In your existing project, how many SWCs are in your library path?
3) Is there anything else happening in the background? incremental compile a.k.a. build automatically, virus scan, etc.
Jason San Jose
Software Engineer, Flash Builder
The problem does not happen on a clean workspace new project. Well the other project would also be the only one in the workspace at the time.
In the existing problem project, I have 2 swc's , noteflight, and an alchemy compiled c bandpass filter algo I created.
The project does build automaticallly.
I do have eset nod32 running, only antivirus, no firewall or security product.
To be honest, it seems there is a lag even while typing.
Task manager is currently showing 569,896k for eclipse.exe *32 process, my cpu usage is around 0 - 2%, Physical memory usage shows 4.67 gb usage with a few apps and a vm running. But even I close everything down except eclipse FB4, and the mem usage goes back down to 1gb its still exactly the same.
I have 8gb ram on this machine, so I don't think its a problem even tho its using 4.5 at the moment?
What information could I provide you to help me further?
Try disabling mark occurrences (the highlighter button in the toolbar) and see if that removes the lag when typing. How big is the file you're editing? Is it MXML or AS?
Jason San Jose
Software Engineer, Flash Builder
@ Jason, thank you so much for the continued help, getting better by each change.
The project has one main mxml file with a size of : 881kb, 6679 lines. Inside that file I import the following:
and a custom package with 8 classes.
In the classes, I use some other general imports, and include a few files out of the popforge library.
When I look at my library path, i have 3 linked wireframe.swc files, I am not sure why there are 3 now that I look at it.
I also have an alchemy compiled swc from c code, that is 81kb.
I have a FlashCatalyst swc in there too. Does that need to be there? It is pretty large 460kb.
Yeah, still very slow response when typing, not even for code hints, but even typing in general with the above project. Code hints have a 1 second delay.
Or when I go to delete a few characters from a line, it just pauses for about 2 seconds before moving back on the line.
Also when I hit CTRL + Z , long lag on this project.
CTRL + S works fast to rebuild the project with the setting set to Build Automatically, its just the typing issue that is really a problem now.
Design view also is working much faster, even switching through states.
I've been exeriencing major performance issue with Adobe Flash build 4.6 on windows 7 64 bits
I've had the same issue with Eclipse before and I have used to same "fix" and it worked for me
This is what I have done ;
- I've installed Java 1.5.0_22 (version 5, 32 bits) (even if it is installed in my "Program Files" directory and not in "Program Files (x86)", it is a 32 bit version)
- I've created this launch batch file :
set CLASSPATH=.;C:\Program Files\Java\jre1.5.0_22e\lib\ext\QTJava.zip
set Path=C:\Program Files\Java\jre1.5.0_22\bin;C:\Windows\system32;C:\Windows;C:\Windows\ System32\Wbem;
set QTJAVA=C:\Program Files\Java\jre1.5.0_22\lib\ext\QTJava.zip
cd "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6"
start /B FlashBuilder.exe
- and I run Flash Builder from this batch file
It doesn't seem to work so fine with java 6 even 32bits... but I didn't do any exaustives tests as I have a working solution.