fenix-framework / fenix-framework

A framework to develop enterprise applications that need transactions, persistence, and a rich domain model.
http://fenix-framework.github.io
GNU Lesser General Public License v3.0
39 stars 21 forks source link

[jvstm-ojb] Remove key functions from base classes #209

Closed jcarvalho closed 8 years ago

jcarvalho commented 8 years ago

By overriding the DefaultCodeGenerator, base classes generated by the JVSTM/OJB Generator are generating Key Functions.

Those are used by the default implementation of domain relations, which are not used in this backend (in favor of RelationLists), thus rendering these functions useless.

By removing the functions, we should see an improvement in both startup time (less fields that have to be initialized) and a smaller memory footprint (not only by reducing the number of object instances, but also the number of loaded classes).

jcarvalho commented 8 years ago

As an example, for a simple application with only a handful of modules (Bennu and FenixEdu CMS), the total number of .class files in the output folder went down from 573 to 484. 16% reduction seems pretty good for such a trivial change :)