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
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:
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.
--
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
YAHOO! GROUPS LINKS
__,_._,___
|