Skip navigation
Currently Being Moderated

Flash Builder 4 Extremely slow under Windows 7 + Java

Mar 25, 2010 12:54 PM

Hello,

 

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.

 

Thanks!

 
Replies
  • Currently Being Moderated
    Mar 25, 2010 1:20 PM   in reply to Andrey Stukalenko

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 25, 2010 2:17 PM   in reply to Andrey Stukalenko

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

     

    Jason San Jose

    Software Engineer, Flash Builder

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 25, 2010 3:18 PM   in reply to Andrey Stukalenko

    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"
            xmlns:s="library://ns.adobe.com/flex/spark"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            applicationComplete="lbl.text = (loaderInfo.bytesTotal / 1024).toFixed(2) + ' KB';">
       
        <fx:Style>
            @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;
            }
        </fx:Style>
       
        <s:controlBarContent>
            <s:Label id="lbl" color="red" fontWeight="bold" />
        </s:controlBarContent>
       
        <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" />
        </s:VGroup>
       
    </s:Application>

     

    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:

    unicode-range

     

    : 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 -->
    <!--
    <languages>
      <language-range>
        <lang>englishRange</lang>
        <range>U+0020-007E</range>
      </language-range>
    </languages>

    -->

     

     

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 25, 2010 10:51 PM   in reply to Peter deHaan

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 8:01 AM   in reply to Jason San Jose

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

     

    Anyone?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 10:01 AM   in reply to rofsky

    @rofsky,

     

    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.

     

    Peter

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 10:10 AM   in reply to Peter deHaan

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

     

    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 10:14 AM   in reply to rofsky

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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 10:21 AM   in reply to Peter deHaan

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 10:26 AM   in reply to Peter deHaan

    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.

     

    Peter

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 11:14 AM   in reply to rofsky

    @rofsky

     

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 11:39 AM   in reply to Jason San Jose

    @Jason,

     

    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,

    Arthur

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 11:56 AM   in reply to rofsky

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 12:34 PM   in reply to Jason San Jose

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

     

    Thanks,

    Arthur

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 12:56 PM   in reply to rofsky

    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

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 1:47 PM   in reply to Jason San Jose

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

    mx.controls.Alert,

    mx.core.SoundAsset,

    mx.rpc.events.FaultEvent,

    mx.rpcevents.ResultEvent.

     

    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.

     

    Thanks,

    Arthur

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2010 4:54 PM   in reply to rofsky

    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.

     

    Thanks,
    Arthur

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2010 3:02 AM   in reply to Andrey Stukalenko

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

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2010 3:04 AM   in reply to xxxxxfdf

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

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 1, 2010 3:38 AM   in reply to xxxxxfdf

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

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2010 6:59 AM   in reply to Andrey Stukalenko

    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.

     

    regards,

     

    Jiri

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 7, 2012 2:40 AM   in reply to Andrey Stukalenko

    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.

     

    Gaël

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points