Re: Profiles to help determine why uncommitted objects are so expensive

From: Andrus Adamchik (
Date: Wed Jan 28 2004 - 21:45:49 EST

  • Next message: Jim Menard: "New objects break FK constraints"


    This is interesting data, but not completely surprising. To talk about
    systematic optimization, we need to

    * profile using 1.1, since I don't envision anybody spending too much
    time optimizing 1.0.* at this point.
    * look at other common scenarios, namely fetching lots of objects, in
    addition to inserting and committing object.

    On Jan 28, 2004, at 8:49 PM, Scott Ellsworth wrote:
    > Char[] 49,192 7,251,488

    This is likely your attribute data - nothing related to Cayenne, and it
    takes ~50% of RAM already.

    > HashMap$Entry 190,586 4,574,064

    HashMap$Entry and HashMap apperance is due to internal structure of
    CayenneDataObject that contains a map of values. I've been thinking
    about optimizing of CayenneDataObject for a while. One way is to create
    an alternative implementation that holds values as real ivars, instead
    of a map. This will result in somewhat less flexibility, and more
    reliance on class generation, but will likely improve performance.
    Another option is to come up with more efficient Map implementation,
    since we know upfront what attributes it will keep and how many.

    > Class[] 31,889 2,830,008

    not sure what this is

    > ToManyList 76,136 1,827,264

    1.1 will be optimized so that ToManyList won't appear here at all,
    unless a to many relationship is explicitly modified before commit.

    > StarSystem 18,996 455,904
    > [...]
    > Player 150 3,600

    The fact that your persistent objects creation takes so little time %,
    means that the rest is mostly spent in superclass initialization and


    This archive was generated by hypermail 2.0.0 : Wed Jan 28 2004 - 21:45:56 EST