"Are you changing the entire dp or values inside it?"
I have 4 dps each which hit its own instance of the component.  I am
getting new data from a webservice and assigning it to the dps like so:
p3.dataProvider = _Book[0].bar
p4.dataProvider = _Book[0].bar  
p2.dataProvider = _Book[1].bar
p1.dataProvider = _Book[1].bar

*Book is an array collection that receives information from my ws


"What kinds of custom component is it?"
My custom component extends UIComponent.  I dynamically draw a few
sprites, labels and text inside of it depending on the data.  Each of
those have an event handler on them.

Those components sit inside Ely's flex component as transparent pages.
 The idea is to dynamically build layers based on what the user wants
to see.  I have Doug Mccune's version of Ely's fish eye component as
the navigation on the bottom.  After I change the dpa few times and my
component gets updated i can really tell that the fish eye component
slows down.


"Is memory usage going up?"
Memory usage does go up.  In firefox after changing the dp about 20
times i pumped it up from 70megs to 220megs.  The browser also takes
up exactly 22% or 25% of the cpu in IE and Firefox respectively.  I'm
on a dual core with hyper threading and I think its maxing out one of
the fake cores.  The weird thing is that it stays at that 22% or 25%.
  I have debugged for updatedisplaylist infinite loops but i didn't
find one. 


"What gets slower?  Scrolling? Something else?"
Everything does.  I have some animations that go very slow.  The fish
eye component goes very slow.  Turning the page in the flex book is
also slow.  It seems like the frame rate gets very low.  Reminds me of
in a video game when there is too much action going on and my computer
slows down.

Sorry for the really long reply, but this component is so important to
me!  I'm in on a Saturday trying to get it fixed :(.

Thank you Alex!

-Nate

p.s. I am also clearing this children along with graphics.clear() in
updatedisplaylist.
                
var j:int = this.numChildren
for (i=0; i<j; i++){
this.removeChildAt(0)
}


--- In [email protected], "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Are you changing the entire dp or values inside it?      What kinds of
> custom component is it?
> 
>  
> 
> ________________________________
> 
> From: [email protected]
> [mailto:[EMAIL PROTECTED] On Behalf Of Nate Pearson
> Sent: Friday, April 06, 2007 5:28 PM
> To: [email protected]
> Subject: [flexcomponents] changing dataprovider on custom component
> 
>  
> 
> I have a custom component that works pretty well. When I change the
> dataProvider while the application is running it gets slower and
> slower. The more I change it the worse it gets. 
> 
> In my updateDisplayList I call graphics.clear(); . Do i need to
> override the dataprovider function and call graphics.clear(); there? 
> If so could someone show me how?
> 
> I also call invalidateDisplayList on my component(s) from my main
> application. Im guessing this is bad practice and it should be called
> some where inside (perhaps when I set the dataprovider?)
> 
> If not, what do you think is wrong?
>


Reply via email to