Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=79653

--- shadow/79653        2006-10-12 19:49:25.000000000 -0400
+++ shadow/79653.tmp.13782      2006-10-12 20:40:17.000000000 -0400
@@ -1,12 +1,12 @@
 Bug#: 79653
 Product: Mono: Class Libraries
 Version: 1.1
 OS: unknown
 OS Details: 
-Status: REOPENED   
+Status: ASSIGNED   
 Resolution: 
 Severity: Unknown
 Priority: Normal
 Component: CORLIB
 AssignedTo: [EMAIL PROTECTED]                            
 ReportedBy: [EMAIL PROTECTED]               
@@ -155,6 +155,30 @@
 is called 4 times, but that strings are allocated from
 System.Text.StringBuilder:InternalEnsureCapacity() 4 times, and that
 the total allocated memory is 120k.
 
 In any case, avoiding the StreamReader and reading the entire contents
 into a StringBuilder is probably the way to fix this, as you suggest.
+
+------- Additional Comments From [EMAIL PROTECTED]  2006-10-12 20:40 -------
+I can't avoid the StreamReader (not without moving part of this into
+the runtime) but the alternate implementation doesn't read everything
+into a single string (so smaller and temporary allocations). It looks
+a little better (130kb versus 154kb) but mono's internal profiler
+isn't precise enough. I'm installing heap-buddy now...
+
+Existing code (SecurityParser)
+Allocation profiler
+Total mem Method
+########################
+     154 KB System.Text.StringBuilder::InternalEnsureCapacity(int)
+         154 KB      101 System.String
+  Callers (with count) that contribute at least for 1%:
+         399  91 % System.Text.StringBuilder::set_Length(int)
+          30   6 % System.Text.StringBuilder::Append(char)
+           5   1 % System.Text.StringBuilder::Append(char[],int,int)
+
+Alternate code (custom handler for SmallXmlParser)
+Allocation profiler
+Total mem Method
+Total memory allocated: 130 KB
+
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to