How is the performance on your machine of the samples in my links ? - trying to isolate player/setStyle performance from application code efficiency.
Thank you,
Anatole


 
On 7/28/06, Pan Troglodytes <[EMAIL PROTECTED]> wrote:

For reference, my testing was done on a dual core athlon 64 4400 with a geforce 7800 gt and 2 gigs of ram.  Hardware is not a limiting factor.

On 7/28/06, Anatole Tartakovsky < [EMAIL PROTECTED]> wrote:
Matt,
I placed typical business case to show the performance issues based on hardware used:
 
case 1 : basic  grid - no formatting or styling
case 3:  typical usage of formatting and styling - IMPLEMENTED VIA RUN-TIME CSS AND COMPUTED EXPRESSIONS - very straightforward code
 
While performance is reasonable on midrange 2 year old PC, my business laptop is very sluggish , however multimedia one with good graphics chip and slower CPU works faster then PC.
 
Here is the source for the business case:
 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml "
     xmlns="*" layout="vertical"
     xmlns:lib="com.theriabook.controls.*" viewSourceURL="srcview/index.html">
<mx:Style>
    .dgHeaderStyle {
        textAlign:center;
        fontWeight : bold;
        backgroundAlpha:.5;
    }
</mx:Style>
<mx:Script>
    <![CDATA[
        include "Employees.inc ";
        private function salaryColor(item:*):int{ return item.SALARY<50000?0xff0000:0x0000ff;}
    ]]>
</mx:Script>
    <lib:DataGridEx  id="a"  width="100%" height="100%" headerStyleName="dgHeaderStyle"
            dataProvider="{getEmployees()}">
        <lib:columns>
            <mx:Array>
                <mx:DataGridColumn   dataField="EMP_LNAME"   />
                <mx:DataGridColumn   dataField="EMP_FNAME"  />
                <lib:DataGridColumnEx   dataField="DEPT_ID"                     props="{{&apos;resource&apos;:&apos;employee&apos;,&apos;keyColumn&apos;:&apos;dept_id&apos;,&apos;autoFill&apos;:&apos;true&apos;}}"/>
                <lib:DataGridColumnEx    dataField="PHONE"    formatString="phone" />
                <lib:DataGridColumnEx    dataField="BENE_DAY_CARE" 
                    itemRenderer=" com.theriabook.controls.CheckBox"  
                    rendererIsEditor="true"  editorDataField="value"  
                    textAlign="center" paddingLeft="5" 
                    expando="{{&apos;onValue&apos;:&apos;Y&apos;,&apos;offValue&apos;:&apos;N&apos;}}" />
                <lib:DataGridColumnEx    dataField="SS_NUMBER"    formatString="ssn"  />
                <lib:DataGridColumnEx    dataField="SALARY"  formatString="currency"
                        styles="{{&apos;color&apos;:salaryColor,&apos;fontWeight&apos;:function (item:*):String{ return item.SALARY > 50000?{ return item.SALARY > 50000?&apos;bold&apos;:&apos;normal&apos;} }}"
                />                   
                <lib:DataGridColumnEx    dataField="SALARY"  formatString="currency"  editable="true"    >
                        <lib:styles>
                            <mx:Object backgroundColor="{salaryColor}" backgroundAlpha=".3"/>
                        </lib:styles>
                </lib:DataGridColumnEx>       
                <lib:DataGridColumnEx    dataField="START_DATE" formatString="shortdate"/>                   
           
                <!--lib:DataGridColumnEx    dataField="BONUS"   formatString="currency"
                        computedFields="{{&apos;BONUS&apos;:function(data:*):Number { return data.SALARY*.1;}}}"
                /-->
            </mx:Array>
        </lib:columns>
    </lib:DataGridEx>
</mx:Application>
 
 
 


 
On 7/21/06, Matt Chotin < [EMAIL PROTECTED]> wrote:

Well DataGrid scrolling performance is something that we've spent a lot of time tuning so I would love for us to get a full test case that we can look at.  I saw in the thread you linked mentioning a 1600x1200 monitor, is the DataGrid taking up most of that real estate?  The more visible rows the slower the scrolling will be.  Another thing you could look at is in your setter for the data comparing against the old value and if it hasn't changed not doing anything, it may be that it's invalidating too often?  I'll ask one of the people who worked on performance if she has any thoughts.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com ] On Behalf Of Pan Troglodytes
Sent: Wednesday, July 19, 2006 11:44 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] performance issues

 

Well, specifically I had a DataGrid using this for the itemRenderer:

package nes {

  import mx.controls.dataGridClasses.DataGridListData ;
  import mx.controls.Label;

  public class SignColorItemRenderer extends Label {
    public var negativeColor:uint = 0xFF0000;
    public var positiveColor:uint = 0x008000;
    public var zeroColor:uint;

    override public function set data(value:Object):void {
      super.data = "">
      var n:Number = data[DataGridListData(listData).dataField];
      if (n < 0)
        setStyle("color", negativeColor);
      else if (n > 0)
        setStyle("color", positiveColor);
      else if (n == 0)
        setStyle("color", zeroColor);
    }
  }
}


I brought it up in this thread:
http://groups.yahoo.com/group/flexcoders/message/43243;_ylc=X3oDMTM3cWM2MG9mBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTYwMDAwNzIwNwRtc2dJZAM0MzI2MwRzZWMDZnRyBHNsawN2dHBjBHN0aW1lAzExNTI4NTY4NDUEdHBjSWQDNDMyNDM-

I tried LOADS of different ways to do it.  I found that anytime I put much of any extra code in, it took away from the responsiveness.  Even replacing the above data procedure with just a single setStyle statement.  As I said, it's not horrible.  But I definitely notice it.

The other main thing I can point out is some sluggishness when resizing the browser window and having it resize/relayout the Flex app.  But it's hard to tell how much of that is the browser and how much is Flex.

On 7/20/06, Matt Chotin < [EMAIL PROTECTED] > wrote:

Can you provide a little more detail on the performance areas that are hurting you?  If there's a sample that demonstrates the speed issue it may be something we can look at.

 

Matt

 


From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com ] On Behalf Of Pan Troglodytes
Sent: Wednesday, July 19, 2006 10:49 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] So? What are folks here actually building...?

 

Well, since I have never programmed in ActionScript at all, my projects have served a dual purpose - functional and educational.  In other words, some of the software may never see the light of day but that's okay - at least it taught me how to build in Flex.

My most "real" application has been an ad-hoc query builder.  We have some financial reporting that it broken down into various fields: branch, quarter, period, that kind of thing.  So I gave each field an accordion pane and filled it with the values for that field.  Then I let the user drag-n-drop the values for each field into another List, arranging them hierarchically however they want.  This then feeds a sql statement that uses group by and rollup to get all the data both on the detail level and summarized by each parent level.

I then feed that into a DataGrid that has many custom renderers.  The main powerhouse is the "tree" renderer.  Basically, the first column down the page looks like a tree of those key fields.  So if they chose to report by quarter, then branch, then manager, it would look like:

(view the following in a fixed width font)
                      Gross      Expenses   Profit
Total                 X          X          X
  1Q-2006             X          X          X

    Branch 1          X          X          X
      Jane Doe        X          X          X
      John Smith      X          X          X
    Branch 2          X          X          X
      Phil Johnson    X          X          X
  2Q-2006             X          X          X
    Branch 1          X          X          X
      Jane Doe        X          X          X
      John Smith      X          X          X
    Branch 2          X          X          X
      Phil Johnson    X          X          X

I put in Xs because I got tired of making up stuff.  But you get the picture.  It's basically very pivot-table-ish.  It's really the graphical touches that seal the deal.  There's icons and animations and colors all over the place.  Not too much, but more than I could have coded in the week or so I've been building it.  I'm an experienced Delphi user and have to say I'm really blown away by Flex.  Delphi is RAD but Flex is RAD^2.

Okay, for my VERY basic advice on what I would put some effort into.  Well, first, fix the bugs that have come out here.  You have a pretty wide base of components already and I would like them to be very stable.  Nothing slows a developer down more than spending hours on a problem to only find the bug isn't in his/her code.

Second, I would REALLY like to see some optimization done.  I know this is going to be hard with the dynamic, frequently untyped nature of Flex.  But some of the code runs painfully slow for what it does.  I'm still not 100% happy with the speed of those custom itemRenderers in the grid.  And I stripped them down as far as they can go and it's not because I wrote bad code.  Overall, the speed is good for an "internet application".  Internet apps get to make excuses.  But I'd like to get the speed good enough to rival native desktop apps.  Sure, not on everything - but at least on GUI graphics.

Keep up the good work.  I haven't had this much fun with a new language in a while...

On 7/20/06, David Mendels < [EMAIL PROTECTED]> wrote:

   

Hello,

 

It has been less than a month since we shipped Flex, but I know many folks on this list had projects they started back in the public beta time.  I know in many cases you may not be able to talk about what projects you are working on, but for those who can I'd love to get a view onto what folks are building.  We spent a long time (almost two years) on all the parts of the Flex 2 product line (and the Flash Player 9) and it is very cool to see the traffic here, the emergence of third party conferences like www.flexseminar.com , the books coming out on Flex, the 60K plus downloads of the IDE in the public beta, but we'd love to get a sense of what real applications people are starting to build.  The team is already working on plans for mid-term and longer term upgrades to Flex, and it helps us to really understand what people are building.  So, if you are able to talk about what you are building please do share--I think it would be very interesting for the community and very valuable for us on the Flex team at Adobe.

 

--David

Adobe




--
Jason




--
Jason





--
Jason


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to