flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: AW: Sorting out Memory issues
Date Thu, 17 Oct 2013 14:43:20 GMT


On 10/17/13 2:11 AM, "christofer.dutz@c-ware.de"
<christofer.dutz@c-ware.de> wrote:

>Hi Marcus,
>
>yesterday I did a Little more investigating. I could find out that there
>was an insane amount of Events generated the UUIDs of These seem to have
>consumed about 60MB. The reason for this seems to be that I was using the
>Default GraniteDS Templates (With minor modifications to make the model
>classes work with BlazeDS) in my flexmojos build to generate ActionScript
>model classes from my Java classes. This build generated the model
>classes with [Bindable] on class Level. I modified my templates to simply
>create non-bindable classes and the Event-Inferno seems to have been
>resolved.
Yes, there is a price to pay to get change events from the properties of a
data class.  If you don't need them, then don't use [Bindable].

>
>But I can confirm that the UUID Generation seems to cause a significant
>amount of CPU and Memory usage. Eventually it would be good to address
>this on a Framework Level.
You can have your data classes implement mx.core.IUID and that should
bypass UUID generation.  In theory, most folks have a unique identifier in
their data items already (customer account #, employee id, etc).

>
>While investigating the "source" method of ArrayCollection (I could have
>beet that this was implemented greatly different in Flex 3.x), I could
>see that internally the Array is wrapped by an ArrayList and that there
>is an alternate implementation with the same Name form an Apache Flex
>package which seems to work with vectors. What's actually the difference
>between the two ArrayList implementations? Could it be beneficial to
>Switch to the new Apache implementation officially in the ArrayCollection
>class?
If you have written your code to work with data sets as Vectors, then not
having to switch back to Array/ArrayList is helpful and can assist in some
type-checking.

However, I believe there are tricks to serializing/deserializing, and
there may be performance issues when casting places where the API loses
the fact that it is a Vector like in a List's selectedItem.  So the
benefits may vary.

-Alex


Mime
View raw message