27 Replies Latest reply on Mar 7, 2012 2:40 AM by gsainson

    Flash Builder 4 Extremely slow under Windows 7 + Java

    Andrey Stukalenko



      I have the following configuration:


      Sony VAIO SZ

      Intel Core 2 Duo 2.1 GHz (T8100)

      4GB DDR3

      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.



        • 1. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
          Jason San Jose Adobe Employee

          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

          • 2. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
            Andrey Stukalenko Level 1



            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.


            Thank you

            • 3. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
              Jason San Jose Adobe Employee

              Can you post your workspace log? C:\Users\you\Adobe Flash Builder 4\.metadata\.log


              Jason San Jose

              Software Engineer, Flash Builder

              • 4. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                Andrey Stukalenko Level 1

                Hello again,


                it looks like the problem is temporarily solved.


                The reason was in the following CSS part:





                fontFamily: Calibri;

                fontWeight: normal;

                fontStyle: normal;

                src: url("assets/fonts/calibri.ttf");




                fontFamily: Calibri;

                fontWeight: bold;

                fontStyle: normal;

                src: url("assets/fonts/calibrib.ttf");




                fontFamily: Calibri;

                fontWeight: normal;

                fontStyle: italic;

                src: url("assets/fonts/calibrii.ttf");




                fontFamily: Calibri;

                fontWeight: bold;

                fontStyle: italic;

                src: url("assets/fonts/calibriz.ttf");



                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





                fontFamily: Calibri;

                fontWeight: normal;

                fontStyle: normal;

                src: local("Calibri");




                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

                • 5. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                  Andrey Stukalenko Level 1

                  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:


                  Log head:


                  !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

                  Log tail:
                  !ENTRY org.eclipse.ui 4 0 2010-03-26 00:22:42.134
                  !MESSAGE Unhandled event loop exception
                  !STACK 0
                  org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Graphic is disposed)
                  at org.eclipse.swt.SWT.error(SWT.java:3777)
                  at org.eclipse.swt.SWT.error(SWT.java:3695)
                  at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
                  at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
                  at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
                  at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
                  at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
                  at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
                  at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
                  at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
                  at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
                  at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
                  at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
                  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
                  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
                  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
                  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
                  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                  at java.lang.reflect.Method.invoke(Unknown Source)
                  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
                  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
                  at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
                  Caused by: org.eclipse.swt.SWTException: Graphic is disposed
                  at org.eclipse.swt.SWT.error(SWT.java:3777)
                  at org.eclipse.swt.SWT.error(SWT.java:3695)
                  at org.eclipse.swt.SWT.error(SWT.java:3666)
                  at org.eclipse.swt.graphics.Image.getImageData(Image.java:1193)
                  at org.eclipse.jface.resource.ImageDataImageDescriptor.<init>(ImageDataImageDescriptor.java: 36)
                  at org.eclipse.jface.resource.ImageDescriptor.createFromImage(ImageDescriptor.java:104)
                  at com.adobe.flexide.editorcore.ui.FlexImageDatabase.getOverlayImage(FlexImageDatabase.java: 251)
                  at com.adobe.flexide.editorcore.ui.SharedImages.getProblemDecoratedImage(SharedImages.java:1 69)
                  at com.adobe.flexbuilder.editorcore.editor.CodeAndDesignEditor$5.run(CodeAndDesignEditor.jav a:1269)
                  at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
                  at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
                  ... 22 more
                  Looks like I have this error in the log every time it starts building my workspace.

                  • 6. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                    Peter deHaan Level 4

                    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"?>
                    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                            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";
                            @font-face {
                                fontFamily: Calibri;
                                fontWeight: normal;
                                fontStyle: normal;
                                src: url("c:/windows/fonts/calibri.ttf");
                            @font-face {
                                fontFamily: Calibri;
                                fontWeight: bold;
                                fontStyle: normal;
                                src: url("c:/windows/fonts/calibrib.ttf");
                            @font-face {
                                fontFamily: Calibri;
                                fontWeight: normal;
                                fontStyle: italic;
                                src: url("c:/windows/fonts/calibrii.ttf");
                            @font-face {
                                fontFamily: Calibri;
                                fontWeight: bold;
                                fontStyle: italic;
                                src: url("c:/windows/fonts/calibriz.ttf");
                            global {
                                 fontFamily: Calibri;
                                 fontSize: 24;
                            <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:



                    : U+0020-002F,U+0030-0039,U+003A-0040,U+0041-005A,U+005B-0060,U+0061-007A,U+007B-007E;


                    /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,


                    1 person found this helpful
                    • 7. Re: Flash Builder 4 Extremely slow under Windows 7 + Java

                      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.

                      • 8. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                        Andrey Stukalenko Level 1

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



                        • 9. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                          rofsky Level 1

                          Jason San Jose, do you think you could help? This slowness is crippling.



                          • 10. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                            Peter deHaan Level 4



                            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.



                            • 11. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                              rofsky Level 1

                              @ Peter, do you consider 695kb compiled big?


                              Also, would that make it extremly slow while typing even? To where the intelisense doesn't even function really.



                              • 12. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                Peter deHaan Level 4

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

                                • 13. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                  rofsky Level 1

                                  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.


                                  Thanks again

                                  • 14. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                    Peter deHaan Level 4

                                    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.



                                    • 15. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                      Jason San Jose Adobe Employee



                                      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

                                      • 16. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                        rofsky Level 1



                                        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.


                                        Thanks again,


                                        • 17. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                          Jason San Jose Adobe Employee

                                          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

                                          • 18. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                            rofsky Level 1

                                            @ Jason,


                                            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?




                                            • 19. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                              Jason San Jose Adobe Employee

                                              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

                                              • 20. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                                rofsky Level 1

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




                                                • 21. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                                  rofsky Level 1

                                                  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.



                                                  • 22. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                                    Andrey Stukalenko Level 1

                                                    Thanks! The problem was all with embedding fonts. I'll play around with other font embedding options (like, using modules to embed and then load them etc.).


                                                    Thank you for your help!

                                                    • 23. Re: Flash Builder 4 Extremely slow under Windows 7 + Java

                                                      My god, it's too slow. We can hardly to use it.... Our OS is WIN7 and XP. All are very slow...  Hardly to work...

                                                      • 24. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                                        xxxxxfdf Level 1

                                                        Very slow....Even if the project is clean, only exists one MXML file.

                                                        • 25. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                                          xxxxxfdf Level 1

                                                          Now, we go back to FB3. Everything goes to normal... Thanks..

                                                          • 26. Re: Flash Builder 4 Extremely slow under Windows 7 + Java
                                                            Yeri T

                                                            Flex SDK 4.x.x can be very slow in combination with SVN/CVS. I opened a bug regarding this issue. On how to fix it, see here.





                                                            • 27. Re: Flash Builder 4 Extremely slow under Windows 7 + Java

                                                              Hi all,


                                                              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.