openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <>
Subject [jira] Commented: (OPENJPA-160) Reuse BrokerImpl objects
Date Fri, 23 Feb 2007 21:39:05 GMT


Craig Russell commented on OPENJPA-160:

>We ran some more performance tests with the latest OpenJPA code and the issue appears
to be with creating an instance of the BrokerImpl (when Configurations calls Class.newInstance).

I'm surprised that the time is being taken in the constructor.  The BrokerImpl is actually
initialized for real during the initialize method, not the constructor, and that's where I'd
expect to find the initialization cost.

There is no constructor implemented for BrokerImpl, so the only initialization done during
the compiler-generated constructor is the initialization of the fields. Most of the fields
are initialized to null, which takes no time (the initial memory allocated is cleared via
a system clear memory call). The only things I see in the field initialization during newInstance
    private final JCAHelper _jca = new JCAHelper();
This is a stateless instance for which the constructor should be "free".

    private ClassLoader _loader = Thread.currentThread().
Ah, perhaps this is the culprit?

> Reuse BrokerImpl objects
> ------------------------
>                 Key: OPENJPA-160
>                 URL:
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Michael Dick

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message