incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Labriola" <labri...@digitalprimates.net>
Subject RE: API for reflection
Date Thu, 08 Mar 2012 20:07:55 GMT
>Mike, did you take any measurements?  Was the reflection data static or per-instance? 
I would expect that the traits information for properties would be as efficient or more efficient
than metadata.  And the >memory overhead of describetype would outweigh the memory of data
structure.

Yes, but I was only looking at items labeled with Inject so my problem space was smaller.
I have not tried to do a general purpose version so I don't have a 1:1 comparison with describeType
which is obviously gathering a lot more. Extrapolating from what I did see, it is much more
efficient than storing all of the metadata. My point on opting in was that in increase should
we automatically use this method AND someone also still uses describeType at all.

As far as storage, it was static data. Effectively, again my goal at the time being very single
purpose, for each class that had Injection points it stored a reference to that Class as well
as the properties and methods labeled with Injection in three arrays (one for constructor
arguments, one for fields, one for methods). In my particular case, I would also recursively
store the same information for classes referenced as types herein, meaning that if one of
the constructor arguments was of type ClassA then I also recorded this same data as I was
attempting to optimize recursive object graph builds.

Mike


Mime
View raw message