[Mono-bugs] [Bug 569109] Exponentially increasing compile time for nested anonymous functions.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jan 20 16:05:37 EST 2010
http://bugzilla.novell.com/show_bug.cgi?id=569109
http://bugzilla.novell.com/show_bug.cgi?id=569109#c1
Kannan Goundan <kannan at cakoose.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|2.4.x |SVN
--- Comment #1 from Kannan Goundan <kannan at cakoose.com> 2010-01-20 21:05:34 UTC ---
Some profiling information. Used SVN trunk versions of Mono, MCS, and
mprof-decoder (downloaded 20 Jan 2010).
Ran MCS with "--profile=logging:calls" on shorter versions of the above example
(i.e. fewer nested closures). As the number of nested closures increases, the
number of times MCS called Expression.Resolve(RC,RF) increases seemingly
exponentially.
- 5 nested closures - 861 calls to Resolve
- 6 nested closures - 2562 calls to Resolve
- 7 nested closures - 7665 calls to Resolve
Here's the first 95 of the output from the 5 nested closures run. (To make it
a bit easier to read in Bugzilla, I removed the "Mono.CSharp" prefix,
abbreviated the method arguments, and removed the "calls from" text from each
line)
5.47% (3.266589s) Expression.Resolve (RC,RF)
735 calls from Expression.Resolve (RC)
123 calls from Invocation.DoResolve (RC)
2 calls from MemberAccess.DoResolve (RC,E)
1 calls from SimpleName.DoSimpleNameResolve (RC,E,bool)
5.40% (3.229021s) Expression.Resolve (RC)
364 calls from Return.DoResolve (BC)
122 calls from Argument.Resolve (RC)
122 calls from SimpleName.DoSimpleNameResolve (RC,E,bool)
121 calls from Convert.ImplicitConversionStandard (RC,E,System.Type,L,bool)
3 calls from ExpressionStatement.ResolveStatement (BC)
1 calls from Invocation.DoResolve (RC)
1 calls from Assign.DoResolve (RC)
1 calls from MemberAccess.DoResolve (RC,E)
4.53% (2.704801s) ToplevelBlock.Resolve (FB,BC,PC,IMD)
363 calls from AnonymousExpression.Compatible (RC,AE)
7 calls from MethodData.Emit (DeclSpace)
1 calls from Constructor.Emit ()
4.49% (2.683888s) Block.Resolve (BC)
366 calls from ToplevelBlock.Resolve (FB,BC,PC,IMD)
4.36% (2.606629s) Invocation.DoResolve (RC)
123 calls from Expression.Resolve (RC,RF)
4.26% (2.547092s) MethodGroupExpr.OverloadResolve (RC,A&,bool,L)
122 calls from Invocation.DoResolveOverload (RC)
1 calls from ConstructorInitializer.DoResolve (RC)
4.25% (2.543228s) Invocation.DoResolveOverload (RC)
122 calls from Invocation.DoResolve (RC)
3.36% (2.009413s) AnonymousExpression.Compatible (RC)
242 calls from AnonymousMethodExpression.Compatible (RC,System.Type)
121 calls from AnonymousMethodExpression.InferReturnType
(RC,TIC,System.Type)
3.36% (2.008970s) AnonymousExpression.Compatible (RC,AE)
363 calls from AnonymousExpression.Compatible (RC)
3.32% (1.985467s) ExitStatement.Resolve (BC)
364 calls from Block.Resolve (BC)
3.31% (1.976084s) Return.DoResolve (BC)
363 calls from ContextualReturn.DoResolve (BC)
1 calls from ExitStatement.Resolve (BC)
3.27% (1.951760s) ContextualReturn.DoResolve (BC)
363 calls from ExitStatement.Resolve (BC)
2.83% (1.692150s) MethodGroupExpr.IsApplicable (RC,A&,int,MS&,bool&)
141 calls from MethodGroupExpr.OverloadResolve (RC,A&,bool,L)
1 calls from DelegateInvocation.DoResolve (RC)
2.68% (1.604864s) AnonymousMethodExpression.Compatible (RC,System.Type)
121 calls from AnonymousMethodExpression.ImplicitStandardConversionExists
(RC,System.Type)
121 calls from Convert.ImplicitConversionStandard (RC,E,System.Type,L,bool)
1.91% (1.139057s) Driver.Compile ()
1 calls from Driver.Main (string[])
1.46% (0.870549s) Convert.ImplicitConversionExists (RC,E,System.Type)
134 calls from MethodGroupExpr.IsArgumentCompatible
(RC,P/M,A,P/M,System.Type)
2 calls from MethodGroupExpr.BetterTypeConversion
(RC,System.Type,System.Type)
1.45% (0.865854s) MethodGroupExpr.IsArgumentCompatible
(RC,P/M,A,P/M,System.Type)
134 calls from MethodGroupExpr.IsApplicable (RC,A&,int,MS&,bool&)
1.38% (0.827287s) MethodGroupExpr.VerifyArgumentsCompat
(RC,A&,int,MS,bool,bool,L)
123 calls from MethodGroupExpr.OverloadResolve (RC,A&,bool,L)
1 calls from DelegateInvocation.DoResolve (RC)
1.38% (0.824883s) TypeManager.InferTypeArguments (RC,A,MS&)
121 calls from MethodGroupExpr.IsApplicable (RC,A&,int,MS&,bool&)
1.37% (0.821094s) Convert.ImplicitConversion (RC,E,System.Type,L)
122 calls from MethodGroupExpr.VerifyArgumentsCompat
(RC,A&,int,MS,bool,bool,L)
1.37% (0.821013s) Convert.ImplicitConversionStandard (RC,E,System.Type,L)
122 calls from Convert.ImplicitConversion (RC,E,System.Type,L)
1.37% (0.820199s) Convert.ImplicitConversionStandard (RC,E,System.Type,L,bool)
122 calls from Convert.ImplicitConversionStandard (RC,E,System.Type,L)
1.36% (0.811247s) TypeInference.InferMethodArguments (RC,MS)
121 calls from TypeManager.InferTypeArguments (RC,A,MS&)
1.35% (0.805843s) TypeInference.InferInPhases (RC,TIC,APC)
121 calls from TypeInference.InferMethodArguments (RC,MS)
1.34% (0.802350s) AnonymousMethodExpression.ImplicitStandardConversionExists
(RC,System.Type)
121 calls from Convert.ImplicitConversionExists (RC,E,System.Type)
1.29% (0.772971s) RootContext.EmitCode ()
1 calls from Driver.Compile ()
1.28% (0.765120s) TypeInference.DoSecondPhase (RC,TIC,System.Type[],bool)
121 calls from TypeInference.DoSecondPhase (RC,TIC,System.Type[],bool)
121 calls from TypeInference.InferInPhases (RC,TIC,APC)
1.28% (0.762707s) TypeContainer.EmitType ()
1 calls from RootContext.EmitCode ()
1.20% (0.715423s) TypeInferenceContext.OutputTypeInference (RC,E,System.Type)
121 calls from TypeInference.DoSecondPhase (RC,TIC,System.Type[],bool)
1.20% (0.715188s) Method.Emit ()
5 calls from AnonymousExpression/AnonymousMethodMethod.Emit ()
2 calls from TypeContainer.EmitType ()
1.20% (0.714588s) MethodOrOperator.Emit ()
7 calls from Method.Emit ()
1.18% (0.707031s) MethodData.Emit (DeclSpace)
7 calls from MethodOrOperator.Emit ()
1.17% (0.698094s) AnonymousMethodExpression.InferReturnType
(RC,TIC,System.Type)
121 calls from TypeInferenceContext.OutputTypeInference (RC,E,System.Type)
1.13% (0.674213s) StatementExpression.Resolve (BC)
3 calls from Block.Resolve (BC)
1.13% (0.674107s) ExpressionStatement.ResolveStatement (BC)
3 calls from StatementExpression.Resolve (BC)
0.95% (0.570696s) SimpleAssign.DoResolve (RC)
1 calls from Expression.Resolve (RC,RF)
0.95% (0.569683s) Assign.DoResolve (RC)
1 calls from SimpleAssign.DoResolve (RC)
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list