Re: profiling technology?

From: Andriy Shapochka (ashapochk..otmail.com)
Date: Sun Mar 09 2003 - 10:28:39 EST

  • Next message: Holger Hoffstätte: "Configuration cleanup (mostly) done!"

    >
    > - the constructor of "PrimaryKeyGenerationSupport"
    > which is called from the "DataContext" constructor
    > and accounts for 90% of the cost of DataContext-creation
    >
    > The bad thing about that is that this cost scales
    > with the number of DbEntities in the map
    > (109 temporary objects per entity)
    >

    No wonder, PrimaryKeyGenerationSupport uses stuff like
    DataMap.getDbEntitiesAsList() and very little optimized as for its
    initialization. It is cached in the owning DataContext though and should not
    affect commitChanges performance seriously. It is created per instance of
    DataContext to support logical primary key dependencies among DbEntities
    belonging to different DataNodes. Moving it to DataDomain would greatly
    decrease the DataContext creation cost without functionality losses but as
    far as I understand it is not necessary to have a DataDomain in a Cayenne
    based application so it is seemingly not an option. Is it correct?
    Another way to improve the performance would be to relate an instance of
    PrimaryKeyGenerationSupport to a DataNode instead of DataContext like it is
    done in the case of DependencySorters. DataNodes live long and are created
    rarely so it solves the problem but in this case we would lose the feature
    mentioned above.
    All in all I agree with Andrus and Holger that any serious code optimization
    should be
    postponed until the major new features work consistently and Beta 1 is out.

    Andriy.



    This archive was generated by hypermail 2.0.0 : Sun Mar 09 2003 - 10:46:45 EST