openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig Russell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-160) Reuse BrokerImpl objects
Date Tue, 27 Feb 2007 20:05:05 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12476353
] 

Craig Russell commented on OPENJPA-160:
---------------------------------------

The real cost according to the trace is in the dynamically created class, not in BrokerImpl<init>.

I don't get it either, except to think that the implementation of the dynamically created
class uses reflection itself, which is slow.

To see if this is the case, we'll need to create a real compiler-generated factory, like this:

openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
...
        brokerPlugin.registerInstanceFactory(BrokerImpl.class.getName(), 
            new BrokerInstanceFactory();
...
       public class BrokerInstanceFactory implements ObjectValue.InstanceFactory {
                public Object newInstance() {
                    return new BrokerImpl();
                } 
...


> Reuse BrokerImpl objects
> ------------------------
>
>                 Key: OPENJPA-160
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-160
>             Project: OpenJPA
>          Issue Type: Sub-task
>            Reporter: Michael Dick
>         Assigned To: Patrick Linskey
>         Attachments: newprofile.jpg, openjpa-160-patch.txt, openjpa-160-patch.txt, perf2.jpg,
perf3.jpg
>
>


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


Mime
View raw message