Re-sending since it bounced From: Matt Chotin No other general rules but this sounds
like a good refactoring. Remember that you can use the profiler to see
where time is being spent, might be useful… From: Yup Excellent guess :-) I am facing some perf. issue and am trying to identify / rule
out potential bottlenecks. The array reset method, is being used to reset the entire application
so a delay is acceptable there. However, right now my biggest hit is in a component that (being created
dynamically) uses 4 nested repeaters, to display a non-uniform grid. Am considering re-writing it using Actionscript and maybe replace some
of the layout containers like HBox and Vboxes with a Canvas where possible. Do you have any other general rules / approaches to consider while
refactoring a bunch of nested repeaters ? - superabe On 11/3/05, Matt
Chotin <[EMAIL PROTECTED]>
wrote: It's not the end of the world in Flex 1.5, it will not be a
good idea in Flex 2 (but we provide new interfaces to make it even
easier). It also depends what the binding destination is doing with the
array. If it's a DataGrid there's a lot more invalidating and redrawing
that happens if you re-assign the whole array vs. just notifying it that one
item changed. Repeater is even worse. Something that is just
holding a reference, less of a big deal. My guess is that you are binding
to something that does react to the array and therefore there is a performance
impact in redrawing all the time. Matt From: flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com]
On Behalf Of superabe superabe
ok...I do
need to reset the array at times, and also to change an item in the index. Is there any
perf hit by reassiging the variable to itself ? -
superabe On
11/3/05, JesterXL <
[EMAIL PROTECTED]> wrote: You
don't need to do that; Array's in Flex already have the DataProvider API (in
1.5), and thus generate events.
my_array.addItem(someItem) Instead
of: my_array.push(someItem) If
you do the addItem, it'll trigger the event, and update whatever controls is
bound to the array. Only reset the array entirely if the whole array
changes. -----
Original Message ----- From: superabe
superabe Sent: Thursday, November 03, 2005 11:11
AM Subject: [flexcoders] Force binding for
Arrays
I realize
that we can force binding for Arrays to occur, when modifying one of their
indexes by doing something like Model.myList
= Model.myList Is there
any performance reasons or other reasons why this would be a bad idea to use? TIA -
superabe -- SPONSORED LINKS
YAHOO! GROUPS
LINKS
YAHOO!
GROUPS LINKS
|