Bug 7553 - Expression Evaluator is working overtime but the boss isn't impressed.
Summary: Expression Evaluator is working overtime but the boss isn't impressed.
Alias: None
Product: iOS
Classification: Xamarin
Component: Debugger ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 6.4 (async)
Assignee: Bugzilla
Depends on:
Reported: 2012-09-30 16:16 UTC by Yvan Rodrigues
Modified: 2013-07-17 11:09 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Sample project. (3.68 KB, application/x-zip-compressed)
2012-09-30 16:16 UTC, Yvan Rodrigues

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Yvan Rodrigues 2012-09-30 16:16:14 UTC
Created attachment 2652 [details]
Sample project.

A sample project is attached, which contains the code below. See the comments.

		public static void Main(string[] args)
			// Make a relatively small Xml document.
			var xml = new XDocument(
				new XDeclaration("1.0", "utf-8", "yes"),
				new XElement("phrases"));

			for(int i=0; i < 250; i++)
				xml.Root.Add(new XElement("phrase", "The quick brown fox jumped over the lazy dogs."));

			// Convert it to a string.
			var start = DateTime.Now;
			string document = xml.ToString();
			var end = DateTime.Now;
			// This will output something like "50.0000ms":
			Console.WriteLine ((end-start).TotalMilliseconds + "ms");

			// Place a breakpoint on this line and evaluate xml.ToString():
			// It takes about 20s to evaluate on my Core i5 with 16GB RAM.

Comment 1 Yvan Rodrigues 2012-09-30 17:30:01 UTC
To clarify, this is not a System.Xml.Linq issue. I just tried to evaluate the content of Array<MyClass>[147] and it took 21 seconds to evaluate 147 instances of MyClass.ToString(), which simple returns the value of a string property.


class MyClass
    string Name { get; set; }

    public string ToString() { return Name; }
Comment 2 Jeffrey Stedfast 2012-10-01 15:09:17 UTC
Try installing the Mono 2.11 alphas and see if you get a performance improvement.

We've added new new debugger protocol features that should make improve this.
Comment 3 Yvan Rodrigues 2012-10-01 15:20:07 UTC
I'm using it with MonoTouch so I can't use 2.11 until it is backported. Is this a MonoTouch issue?
Comment 4 Jeffrey Stedfast 2012-10-01 16:42:44 UTC
It's a mono runtime issue, so in that respect, it's a "MonoTouch issue" (in that MonoTouch includes the mono runtime).

Mono 2.11 has protocol updates in the runtime that allow MonoDevelop to chunk back string results instead of needing to read the entire string before displaying it.

I've just installed this Mono 2.11 build:


It evaluated xml.ToString() in the immediate window in about a second or two.

Mono 2.10.10 (which is being prepped for a stable release in another month) takes about ~8 seconds or so for me, so there's quite a bit of performance improvement between 2.10 and 2.11 for evaluations such as this one.

I'm also on a Core i5 Mac, so perhaps 2.10.10 has some improvements there or maybe it's just that my i5 is faster. I haven't tested 2.10.9 to see.
Comment 5 PJ 2013-04-23 14:17:20 UTC
Stable support for mono 3.0 will be landing in the 6.4 Xamarin.iOS. Changing to this milestone.
Comment 6 PJ 2013-07-11 16:41:18 UTC
With XS 4.0.9 and Mono 3.1.1 (3.2 Release Candidate), it takes me about 2 seconds to evaluate xml.ToString().

Comment 7 narayanp 2013-07-17 10:45:16 UTC
Today I have checked this issue with following builds

X.S 4.0.10(build 5)
Mono 3.1.2
Xamarin.iOS 6.3.8-10

When we are building the attached project we are getting 2 build errors: https://gist.github.com/saurabh360/dedf5339d12117c1fe73 we are not sure what step we are missing here. Please suggest for the same
Comment 8 Mohit Kheterpal 2013-07-17 11:09:20 UTC
Today I have checked this issue with following builds

X.S 4.0.10(build 5)
Mono 3.1.2
Xamarin.iOS 6.3.8-10

We are able to debug the attached sample and it shows 51.888ms in pop-up window.

Hence closing this issue. Changing its status to verified