[Mondrian] Large number of clone calls associated withMemberTypeenumeration

Robin Tharappel rtharappel at prospricing.com
Sat Jul 14 10:47:20 EDT 2007


It looks like the clone calls went down from 190 millon to about 2
million. Below is the what the profiler shows before and after the
change

Before fix:

Method Call Count: Callers of java.lang.Object.clone: # of calls
 138162817 mondrian.olap.MemberBase.isCalculated()
  45583144 mondrian.rolap.RolapEvaluator.setContext(Member)
   5419560
mondrian.olap.fun.CrossJoinFunDef.nonEmptyListNEW(Evaluator,List,Resolve
dFunCall)
    998297
mondrian.olap.fun.CrossJoinFunDef.crossJoin(List,List,Evaluator,Resolved
FunCall)
    198216
mondrian.rolap.SqlMemberSource.getCommonChildLevelForDescendants(List)
    123060 mondrian.rolap.RolapEvaluator.setContext(Member[])
     61327 java.lang.Class.getConstructor0(Class[],int)
     20595 mondrian.olap.Member$MemberType.values()


After fix:
Method Call Count: Callers of java.lang.Object.clone: # of calls
   1996577
mondrian.olap.fun.CrossJoinFunDef.crossJoin(List,List,Evaluator,Resolved
FunCall)
     60683 java.lang.Class.getConstructor0(Class[],int)
     15356 java.lang.reflect.Constructor.getParameterTypes()
      2192 java.lang.Class.getEnumConstants()
       996 java.security.AccessControlContext.<init>(ProtectionDomain[])
       836 org.jdom.Content.clone()
       668 java.lang.reflect.Method.getParameterTypes()


The CrossJoinFunDef.crossJoin() method has the next highest amount of
clones. The clone method is invoked on the Member instances in this
case. Thanks for getting this fix.


Robin 

-----Original Message-----
From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org]
On Behalf Of Julian Hyde
Sent: Saturday, July 14, 2007 2:24 AM
To: 'Mondrian developer mailing list'
Subject: RE: [Mondrian] Large number of clone calls associated
withMemberTypeenumeration


> To reduce the number of clone calls we 
> introduced a static array of the enumerated values and used 
> this array in the getMemberType method.

Well spotted. Thanks! Fixed in change 9587.

> The profiler showed about 190 million calls of the clone method.
> Approximately 130 million calls were derived from the
> MemberBase.isCalculated() method

Even after this is fixed, 60 million calls to clone() is still a lot.
Did
the profiler show any other major culprits?

Julian

_______________________________________________
Mondrian mailing list
Mondrian at pentaho.org
http://lists.pentaho.org/mailman/listinfo/mondrian


The information contained in this email may be confidential and/or legally privileged. It has been sent for the sole use of the intended recipient(s). If the reader of this message is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please contact the sender by reply email and destroy all copies of the original message. Thank you





More information about the Mondrian mailing list