Flex application and several basic material

Hello

my company is developing an enterprise application pretty huge involving 4 Flex, BlazeDS, a server side Java-spring and frame matte on the client side.

It works very well but as demand is growing bigger and bigger performance problems are a major concern for us... And our customers!

We just noticed a performance problem and I could not find any resource from Google, it's here:

It seems to us that no matter what the number of CPUS of your computer has, our Flex application always use only one. Accordingly, our application rolls over on a P4 core at 3 GHz computr processor than, say, on a core i7 with 8-processor 1, 6 GHz! Pretty strange isn't it?

However, I learned that multicore of handfuls of Flash Player since version 9, so perhaps am I missing something simple? Is there something I should do to enable multicore processing? What is my application which is poorly designed? Or an operating system issue maybe?

Any help would be greatly appreciated

Thank you

Matt

ActionScript is single-threaded, so there is no advantage to try to spread his treatment between multiple cores.  Once the actionscript code has implemented the displaylist for a framework, certain aspects of the rendering of the display list can be distributed to the other cores or even a gpu.  Use the performance profiler to see where you as usage patterns are expensive and optimize.

Tags: Flex

Similar Questions

  • Flex application and component talk to each other?

    Hi all.

    I have built on a large flex project and try to condense a little downwards out of the code and put it in the individual components.  Can I call then.  Not only to reduce the number of lines of code, but to also make it easier to make improvements, and if others get involved with the project that they may be charged a component rather than all of the code.  In my view, it is logical to try to work this way.

    I should point out that I am using Flash Builder 4.

    To try it, I worked on an example.

    What I hoped to do, it is to pass variables and the values of a component to the main application, is it possible?

    That's what I've tried but I get an error the main code can not see the text field in the component.

    Code in the main file

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:fx s:Application ' http://ns.Adobe.com/MXML/2009 "
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" minWidth = minHeight = "955" "737" height = "600" width = "470" xmlns:ns1 = "*" >
    < s: states >
    < name s: State = "on" / >
    < name s: State = "two" / >
    < / s: states >
    < fx:Declarations >
    <! - Place non-visual elements (e.g., services, items of value) here - >
    < / fx:Declarations >

    < fx:Script >
    <! [CDATA]

    private function btn_submit (): void
    {
    If (txt_user.text = 'Hello')
    {
    currentState = "two";
    }
    on the other
    {
    currentState = "a";
    }
    }

    []] >
    < / fx:Script >

    < s:Label x = "10" y = "10" text = "Test Log In on component" width = "717" textAlign = "center" fontWeight = "bold" fontSize = "18" / >
    < ns1:Loginform = "190" x y = "71" >
    < / ns1:Loginform >
    < / s:Application >

    The component code

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:fx s:Group ' http://ns.Adobe.com/MXML/2009 "
    xmlns:s = "library://ns.adobe.com/flex/spark".
    xmlns:MX = "library://ns.adobe.com/flex/mx" width = "400" height = "300" >
    < fx:Declarations >
    <! - Place non-visual elements (e.g., services, items of value) here - >
    < / fx:Declarations >
    < s:TextInput = "53" x = "62" width = "298" id = "txt_user" / >


    < s:Button = "281" x = "92" label = "Button" click = "btn_submit ()" / >
    < / s:Group >

    I don't know if I want to do (spend data from a component to the application main and rear) is possible.

    If someone could develop on it, I would be grateful!

    If the "publishName" of the component property is writable, then Yes.

    Two solutions:

    -First if you always use the same file name:

    
    

    -So if you want to change it, you can always use:

    
    

    And then in the Script code:

    myRecorder.fileName = "myFileNameOrWhateverStringHere";
    

    If the property is not writable, because it has no Set accessor, you must provide one (that is if you can change the code of the component).

  • MultiTaskFlow liaison: Hi I have a main application and several sub these i added to my resources and using their taskFlows applications in my main application by creating the multitaskFlow binding. My problem is that how can get us currently rendered you

    Hi, I have a main application and many applications these i have added to my resource and using their taskFlows in my main application by creating the multitaskFlow binding. My problem is that how can currently get us renderings taskFlow Id link MultiTaskFlow running through an action created in our main application. Please explain if we can.

    Hello

    Try to remove the af: group in the facet of the toolbar or use this code in your bean.

    UIComponent panelBox is ae.getComponent () .getParent () .getParent ();.

    Kind regards

    Ruben.

  • Flex applications and user activity tracking

    Hello

    My question is simple: is there a way to monitor the activity of users within a Flex application?

    Best regards

    Thanks a lot David for explanations. I will apply this as soon as possible.

  • FileReference - crossdomain.xml - restrict access to all MY Flex application?

    I have a Flex application based on the web (domain A) concerning must download files on the desktop of the user FROM an external server (domain B). I use Adobe FileReference class to do this. Now, I know that I need a file crossdomain.xml to the external server in domain B to establish trust between the Flex application and the server download. In the end, I need any user to any domain to have access on the server download for the cross-domain file must specify:

    allow-access-from domain="*"

    But this will open up acess to the downloadble files to any flex app out there on the web . Is there a way to restrict access to just MY Flex app in the
    crossdomain.xml file?

    thx in advance!

    -MC

    Why do you need any user to any domain access?

    Anyone using your web application will be in area a. unless you count should the swf for others to download from their servers (which woiuld be strange)

    the field is the place where its hosted

  • Simple Newbie Question - download flex applications

    I'm very new guy, sorry for the stupid question. It is my first adventure in Flex.

    I'm working on a graphic spring flex application and I went to show a worker co on his computer and it wouldn't work. I went to the html file in the bin-debug, it works on my machine, but not hers.

    This also got me questioning what I have to download online when I'm done so that it can work.

    The paths of the library are all absolute links on my machine like that

    C:\Program Files (x 86) \Adobe\Adobe Flash Builder 4\sdks\4.1.0

    Any help is really apprieciated. I did a few tutorials, but none of them actually go to upload files.

    Thank you

    Randy

    Hello

    Your Flex program will work on your computer if you are using Flash Builder because it puts in place a 'special' environment to allow you to test your applications at the local level.  These files are all based on mxml and do not work outside the Flash Builder environment.

    For others to access your application, open the Project menu, and then select 'Export Release Build'.  This will create the code html, swf and other files for people using your app.  The main application will be the same name as your project - something like: myApp.html.  (unless you have changed the default application)

  • Flex 3 and PHP Sessions

    I use PHP with my Flex application and I am trying to create a shopping cart. I have a PHP Session for the contents of the basket and tried to send data in XML shopping cart. However, this works if I am on the XML/PHP page, but not in the Flex application.

    Here's my PHP file that produces the XML:
    <? PHP
    Header ("' Content-type: text/xml '");
    echo "<?" XML version = "1.0"? > ';
    session_start();
    If (! isset($_SESSION['ShoppingBasket']))
    {
    $_SESSION ['cart'] = array();
    }

    If ((isset($_GET['BuyPalette'])) & & (isset($_GET['NoOfPalettes'])))
    {
    $_SESSION ['cart'] [] = array)
    'PaletteNo' = > $_GET ['BuyPalette'],
    'NoOfPalettes' = > $_GET ['NoOfPalettes']
    );
    }

    $NoOfItems = count($_SESSION['ShoppingBasket']);
    $Return = "< basket > < NoOfItems Total ="$NoOfItems"/ > < / basket > ';
    print ($Return);
    ? >


    It's my addition of basket in ActionScript function:
    public void AddToBasket (): void {}
    document. ShoppingBasketItems.url = "" http://localhost/Flex/Personalised%20Palettes-debug/Header.php?BuyPalette= "; "
    document. ShoppingBasketItems.url = PaletteNumber;
    document. ShoppingBasketItems.url = '& NoOfPalettes =';
    document. ShoppingBasketItems.url = NumberOfPalettes;
    document. ShoppingBasketItems.send ();
    }

    And it's the label that I want to update:
    < mx:Repeater id = dataProvider = "{ShoppingBasketItems.lastResult.NoOfItems 'ShoppingBasketRepeater'} ' startingIndex = '0' >"
    < mx:Label '640' = x y = '13' text = "Your Shopping Basket contains {ShoppingBasketRepeater.currentItem.@Total} Item (s)" color = "#FFFFFF" id = "ShoppingBasketLabel" / >
    < / mx:Repeater >

    Y at - it a particular way for the delivery of PHP sessions in a Flex application?

    Thank you
    Katy

    Add each of your service url variables rather than crush them.

    TS

  • Several pages of a Flex application

    I have a Flex application that requires several steps: the user must enter some info in the first Panel, then the user should be directed to another "page" to fill another Panel and then directed to a page displaying the results only. How can I do this? The only way I've gleaned in the videos was turning on and outside visibility. Is there a better way, like linking a different component to an application, or an application to another? Looks like might get confused and cluttered in the design phase. Thank you!

    Yes, you can do it in Flex 3, although the syntax is a bit more complicated (not horribly if). Adobe has streamlined for Flex 4 to make it much more intuitive.

    For Flex 3 videos (http://www.adobe.com/devnet/flex/videotraining/) look in 4 day for these two videos:

  • How to incorporate and display a SWF in a Flex application.

    Hi all

    I'm trying to embed a swf animation in a flex 4.5 application and display it, but it does not work!

    I get error after error.  When I try to use addElement(), I get the following error:

    1067: coercion of a value of type mx.core:MovieClipLoaderAsset to an unrelated type mx.core:IVisualElement.

    If I use addChild(), then he throws another error when running.

    Here is my code:

    [Embed(source="assets/con_mov.swf")]
    private var connectMov:Class;
    private var conMov:MovieClipLoaderAsset = new connectMov();
    

    Here's the code I'm trying to use it to displey:

    borderContainer.addElement(conMov);
    

    I tried just to add to the application using this.addChild (connectMov), but I get an error during execution.  It's ridiculous!  Bringing a swf created in Flash into Flex and displaying should not require so much effort - IMHO.  There is a lot of documentation on how to embed a swf in Flex, but almost nothing about how to post!

    It's just a simple animation placeholder so I need access to all the functions on the inside, I want to integrate rather than using swfLoader.

    Thanks for any help or advice you can give!

    Matt

    Hello Matt,

    Yes you are right, it is not necessary to set the source of the image that we add a movieclip with swf. It was a mistake in my

    code, because I have tried it with too many crazy ways.

    Now the SWFLoader, ABT

    This technique works well with the SWFs that adds a graphical application or animations, but are not intended to have a large amount of interaction with the user. If you import SWF files that require a large amount of user interaction, you must build them as custom components. (Adobe Docs)

    Thank you and best regards,

    ---------------------------------------------------------------------- ----------------------------

    Kanchan Ladwani | [email protected] | www.infocepts.com

    ---------------------------------------------------------------------- ----------------------------

  • Is it possible for a flex application to reproduce a structure of files and folders to the customer without zip

    I have an upload/download of flex based app that works very well for download, but when it comes to download, I have coldfusion zip files and folders together and then just by downloading this single file.  I would like to have the flex application to replicate files and folders on the clients computer without having to zip & unzip them and I was wondering if this is even possible.  If I remember correctly, I thought that flash could not create folders on the clients computer...

    Thank you!

    a desktop AIR application can write files/folders to the users ' computer

    a web application could not

  • In Flex application feature sometimes works and sometimes does not...

    Hello

    Please help me on this...

    In my flex application features works sometimes and doesn't work sometimes does not...

    In my project, I have 5 sections with 5 separate screens... Each screen is a module of different.

    After logining in the application:

    I'll go to a screen... First time each feature works in this form...

    Ex: I have a screen with datagrid. This user select name from a datagrid job click on the next button...

    According to the name of the selected user work, I display information on the next screen and customer names.customer whose name is a drop-down list box.

    Here is the code:

    public void populateAllOEMCustomers(event:ResultEvent):void
    {

    1) var object_CustomerList:CustomerList = event.result as CustomerList; the values of the object //Assigining the object reference variable result.

    (2) var allOEMCustomersCollection:ArrayCollection = new ArrayCollection(); Variable declaration ArrayColliction referance.

    (3) var i: int = 0;
    (4) var customerComboLabel:Label = new Sun;

    (5) for (i = 0; i < object_CustomerList.arryCollCustName.length; i ++)
    {
    var strCustName:String = object_CustomerList.arryCollCustName.getItemAt (i) m:System.NET.SocketAddress.ToString ();
    var strCustId:String = object_CustomerList.arryCollCustId.getItemAt (i) m:System.NET.SocketAddress.ToString ();

    customerComboLabel = new Sun; Dynamic Declaration of the label.

    customerComboLabel.name = strCustName; Assinging the customer name in the label name box.
    customerComboLabel.text = strCustId; Assingning the customer id in the text box on the Label.

    allOEMCustomersCollection.addItem (customerComboLabel); Addition of Lable in the referace ArrayCollection variable collection.
    }
    customerComboID.selectedItem = ' - ';.
    OEMCustomersComboID.dataProvider = allOEMCustomersCollection;
    OEMCustomersComboID.selectedItem = - 1;

    }

    This feature works very well when I visit the first time on the screen... If you go back to another screen and return to the same screen and click the button following this names combo box customer time has no customer Details... I get Nullpointer Exception and it shows the number of the line 5 (I gave the above code number..)

    If I change the first line of the code to the following: each time the feature above works fine. Not getting no not an error msg...

    var object_CustomerList:Object = event.result;

    If I type cast in specific class (CustomerList), the feature does not work... do null pointer exception... If I type cast to object everything works fine... In my code each time I'm typecasted for the features of the specific class is not working (gettingNullpointerExcepion).

    Please help me on this... I don't get what could be the reason...

    I am using::Flex 3, Flash player 10.1

    Thanks in advance...

    Kind regards

    Satya

    Hi Satya,

    This sometimes as in your case may not work the way you have specified the RemoteClass attribute in your AS class. Because sometimes there may be a case because before it is mapped to a server-side, you are returned to the data and so that you can not get your custom class data but as normal object type.

    So to avoid this, you can map the class server-side for as classes in the Manager PreInitialize itself as shown below:

    Specify the preinitializeHandler in your main application and write the function below. That way, too, you can map as classes on the side server. So you will have no problem referring to your application AS class types.

    You can use the same line for recording of all classes. Using this, you can remove all of the [RemoteClass] attributes on all CLASSES and attach it to the unique place.

    preinitialize = "onPreinitialize ()" "

    private function onPreinitialize (): void
    {
    registerClassAlias ("com.expeditor.ScriptAdmin.Objects.CustomerList", list of clients);
    }

    In the line above the quoted string code refer to the namespace of the class on the server side and the second is your AS class. Also, remember to import the namespace from the correspondent as a class in the file.

    Try this and let me know...

    Thank you

    Jean Claude

  • Problems with the ColdFusion Extensions and CF/Flex Application Wizard

    I configured the Eclipse RDS according to the instructions in the help documentation. The RDS Fileview and Dataview work OK, but I did have luck with the browser Services: when I try to increase (+) the element localhost, the only thing that appears is the message "Unable to get the metadata for CFCs."

    The components Panel in Dreamweaver 8, which has exactly the same information, works very well.

    Perhaps related to the above: when I create a Flex with the CF/Flex Application Wizard project and examine project properties, in the Flex Server section, I get "because this project does not use a server, these settings do not apply. I find it strange: a ColdFusion project that does not use a server? In any case, the wizard, I not was able to create a simple project that works.

    If anyone has had similar problems and was able to solve them, I would be grateful little light on the subject.

    Carlos

    Well, I could solve this problem by CF UN-installing and reinstalling.

    I did some more tests (UN/reinstall once again) and it seems that this problem occurs when CF is installed in devnet version mode and not if in developer mode.

    To check if CF is installed in devnet mode look in the administrator of the CF under "server settings-> analytical settings-> version information", you will see a notation for devnet.

    I also did a little poking around and it happens whenever you install CF using a certain range license keys. The keys of this range are valid keys for installation, but they alter some critical parameters in CF (watermark paper/pdf flash and apparently some RDS stuff), the solution is to install with a key dev-net or in developer mode.

  • How to view the application in several languages

    I'm developing a Flex application that should be displayed in several languages. What would be the best approach to this?

    Search for these topics in the help of Flex 2.0.1:
    Creating a localized application
    The use of subclasses of ResourceBundle localized properties files
    With the help of the ResourceBundle API

    Basically in Flex 2.0.1 you create a .properties file with your localized strings, and then in your UI, you access the localizable strings in the .properties files. For example you can name strings.properties. When you compile the application, you are using a local arg, so the file strings.properties good language is compiled into the SWF file.

    The file strings.properties various languages is usually placed within a structure of directories within your project:
    -regional settings
    -en_US
    -en_US
    -ja_JP

    The entries in the file strings.properties are key = value pairs, such as:
    open_button_label = open

    and the entries are accessible in your MXML application as follows:

    You will also need to locate the file:
    Flex Builder 2\Flex SDK 2\frameworks\locale\en_US\framework_rb.swc

    Read the help documentation given that more details to know. In Flex 3.0 localization will be even more flexible.

  • Flex Application Interaction with load Flash SWF

    Hi all

    First of all, the context:

    I'm creating a Flex application with a component that displays several SWF loaded dynamically, one at a time (a bit like a kiosk). These loaded SWF files is created in the Flash IDE, Flex No. They will not be created by us (we will provide a .fla but model it is), so I am loading them in a separate SecurityDomain.

    My Questions:

    1. I want the application to be able to call methods inside the loaded SWF file. To do this, I would just call Security.allowDomain ("flex application domain") in the boot process for the loaded SWF file?

    2. I want the SWF loaded to throw events that are taken by the application. Can I achieve this through the SWFLoader.swfBridge (http://www.adobe.com/livedocs/flex/3/langref/mx/controls/SWFLoader.html#swfBridge) property?

    3. I'm defining an interface for methods inside the loaded SWF file. But I don't want to leave the implementation up to the customer. Instead, I want to provide another SWF that contains the implementation of the interface and have a constraint that the customer includes it in their SWF file. I'm not very familiar with the Flash programming environment, how would that work so that the SWF interface implementation exposes his methods so as to be accessible to the Flex? Is it possible to sign the SWF file so that the Flex application knows that it is dealing with the original, not a parody? How would the Flex code pass in arguments, since it is through SecurityDomain limit - is there marshaling involved (for example if I want to pass in a dictionary or some kind of object graph)?

    4. The Flex application can load hundreds of these small other sovereign wealth funds during his life. How can ensure me that it is not continue to use more memory? I intend using SWFLoader.unloadAndStop () and erase all references to the Flex object that refers to it. Is this enough? Will be the AppDomain for the loaded SWF file to tear down automatically so that the class definitions are no longer in memory?

    Thank you

    Knockaert

    3 sounds good, but that's all theory.

    I think that there are other ways to package code to Flash other than "components".  I think that there are some libraries of data/network, but I don't know how they are packed these days.

    4. in theory, it will try to match fields that match and ignore those that do not fit as well.  With the help of readObject/writeObject should work, but you should be able to call the IExternalizable APIs directly.

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • Multiple Flex applications on a single Page

    Now that I was laid off from Adobe (with 700 other people), I would ask you Flex consulting opportunities, and one of the possibilities are web designers/developers wishing to offer their customers a value-added components.

    My question is I've heard you don't want for example three separate applications to Flex on a single web page, as it results in three instances of the generated Flash Player, or something like that.

    So is it necessary to group multiple Flex components in a Flex application to each web page? This may limit the placement of Flex components on a web page, because the web page will be completely done in Flex, that the page should be available.

    No indication in this regard, especially Alex and others on Adobe's Flex product team.

    All new Flex needs help on Flex components/applications, I am available: [email protected]

    Thank you!

    Greg

    IMHO, it's all about memory.  Many pages have several flash banner ads running drives.  This is because these ads are small.  If you go to paste a few applications really small flex on a page, I would expect that most people have enough computer resources to manage it.  Once you get more complex, your apps also probably face more screen real estate and soon you are looking for a portal and probably should have a main shell that loads of apps.

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

Maybe you are looking for