[Mono-bugs] [Bug 79653][Nor] Changed - System.Security.Cryptography.CryptoConfig:LoadConfig reads config in one big blob

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Oct 12 20:40:17 EDT 2006

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 sebastien at ximian.com.


--- 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   
 Severity: Unknown
 Priority: Normal
 Component: CORLIB
 AssignedTo: sebastien at ximian.com                            
 ReportedBy: joeshaw at novell.com               
@@ -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 sebastien at ximian.com  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

More information about the mono-bugs mailing list