[Mono-bugs] [Bug 76017][Min] New - Unnecessary allocations in System.Runtime.Serialization

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Sep 8 20:25:16 EDT 2005


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

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

--- shadow/76017	2005-09-08 20:25:16.000000000 -0400
+++ shadow/76017.tmp.26755	2005-09-08 20:25:16.000000000 -0400
@@ -0,0 +1,27 @@
+Bug#: 76017
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: trow at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Unnecessary allocations in System.Runtime.Serialization
+
+System.Runtime.Serialization.ObjectIDGenerator needs to maintain a
+Hashtable in which the keys are object instances.  To do this, it
+introduces an InstanceWrapper class which overrides Equals and GetHashCode,
+and uses those objects as the Hashtable keys.  However, this means that we
+have to allocate one of these objects for every Hashtable lookup.
+
+It would be much more efficient (and not any more difficult) to instead
+create a custom IComparer, passed in as an argument to the Hashtable's
+constructor.


More information about the mono-bugs mailing list