[Mono-docs-list] Monodoc Assembler Performance patch

Ben Maurer bmaurer@users.sourceforge.net
19 Jun 2003 20:48:46 -0400


--=-At/txOOWuY5Bd5v+QRrT
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Found two bugs, they are now fixed.

new version attached 

--=-At/txOOWuY5Bd5v+QRrT
Content-Disposition: attachment; filename=monodocperf.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; name=monodocperf.patch; charset=UTF-8

Index: corlib/en/System.Collections/BitArray.xml
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvs/public/monodoc/class/corlib/en/System.Collections/BitArray.x=
ml,v
retrieving revision 1.2
diff -u -r1.2 BitArray.xml
--- corlib/en/System.Collections/BitArray.xml	1 Jun 2003 15:53:46 -0000	1.2
+++ corlib/en/System.Collections/BitArray.xml	20 Jun 2003 00:57:55 -0000
@@ -23,10 +23,17 @@
       </Attribute>
     </Attributes>
   </AssemblyInfo>
-  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See th=
e &lt;link location=3D"node:gtk-sharp/programming/threads"&gt;Gtk# Thread P=
rogramming&lt;/link&gt; for details.</ThreadSafetyStatement>
+  <ThreadSafetyStatement>
+    <para>Public static (Shared in Visual Basic) members of this type are
+    safe for multithreaded operations. Instance members are not guaranteed
+    to be thread-safe.</para>
+
+    <para>The framework does not provide a thread safe version of BitArray=
</para>
+  </ThreadSafetyStatement>
   <Docs>
-    <summary>To be added</summary>
-    <remarks>To be added</remarks>
+    <summary>The BitArray class represents an ordered set of bits.</summar=
y>
+    <remarks>Using a BitArray is more memory-efficient than using bool [].=
 However, a slight tradeoff
+    in speed is made, because of the shifts that must be preformed to comp=
actly store the BitArray inside an int [].</remarks>
   </Docs>
   <Base>
     <BaseTypeName>System.Object</BaseTypeName>
@@ -56,9 +63,18 @@
       </ReturnValue>
       <Parameters />
       <Docs>
-        <summary>To be added</summary>
-        <returns>To be added: an object of type 'object'</returns>
-        <remarks>To be added</remarks>
+        <summary><para>Returns a <see cref=3D"T:System.Object" /> that is =
a copy of the current instance.</para></summary>
+        <returns><para>A <see cref=3D"T:System.Object" /> that is a copy o=
f the current  instance.</para></returns>
+        <remarks>
+	<para>
+	<block subset=3D"none" type=3D"note">This method is implemented to suppor=
t the <see cref=3D"T:System.ICloneable" />
+	interface.</block>
+	</para>
+	<para>
+	In this implementation, the clone that is made is a deap clone. However t=
he ECMA calls for a shallow clone.
+	Please do not depend on the behavior of this method, as it may change.
+	</para>
+	</remarks>
       </Docs>
     </Member>
     <Member MemberName=3D"GetEnumerator">
@@ -69,9 +85,27 @@
       </ReturnValue>
       <Parameters />
       <Docs>
-        <summary>To be added</summary>
-        <returns>To be added: an object of type 'IEnumerator'</returns>
-        <remarks>To be added</remarks>
+        <summary>
+          <para>Returns a <see cref=3D"T:System.Collections.IEnumerator" /=
> for the current
+   instance.</para>
+        </summary>
+        <returns>
+          <para>A <see cref=3D"T:System.Collections.IEnumerator" /> for th=
e current instance.</para>
+        </returns>
+        <remarks>
+          <para> If the elements of
+      the current instance are modified while an enumeration is in progres=
s, a call
+      to <see cref=3D"M:System.Collections.IEnumerator.MoveNext" /> or <se=
e cref=3D"P:System.Collections.IEnumerator.Current" /> throws <see cref=3D"=
T:System.InvalidOperationException" /> . </para>
+          <block subset=3D"none" type=3D"note">
+            <para> For detailed information regarding the use of an enumer=
ator, see
+      <see cref=3D"T:System.Collections.IEnumerator" />.</para>
+            <para>This property is implemented to support the <see cref=3D=
"T:System.Collections.IList" /> interface.</para>
+          </block>
+          <para>
+            <block subset=3D"none" type=3D"behaviors">As described
+   above.</block>
+          </para>
+        </remarks>
       </Docs>
     </Member>
     <Member MemberName=3D"CopyTo">
@@ -208,10 +242,11 @@
 		<Parameter Name=3D"length" Type=3D"System.Int32" />
 	</Parameters>
       <Docs>
-        <summary>To be added</summary>
-        <param name=3D"length">To be added: an object of type 'int'</param=
>
-        <returns>To be added: an object of type 'BitArray'</returns>
-        <remarks>To be added</remarks>
+        <summary>Creates a BitArray with a specified length.</summary>
+        <exception cref=3D"T:System.ArgumentOutOfRangeException"><paramref=
 name=3D"length" /> &lt; 0.</exception>
+        <param name=3D"length">The length that the new BitArray should hav=
e.</param>
+        <returns>A new BitArray with <paramref name=3D"length"/> bits.</re=
turns>
+        <remarks>This implementation creates an int[] with a length of <pa=
ramref name=3D"length"/> / 32. Each element is marked as <see langword=3D"f=
alse"/>.</remarks>
       </Docs>
     </Member>
     <Member MemberName=3D".ctor">
@@ -223,11 +258,12 @@
 		<Parameter Name=3D"defaultValue" Type=3D"System.Boolean" />
 	</Parameters>
       <Docs>
-        <summary>To be added</summary>
-        <param name=3D"length">To be added: an object of type 'int'</param=
>
-        <param name=3D"defaultValue">To be added: an object of type 'bool'=
</param>
-        <returns>To be added: an object of type 'BitArray'</returns>
-        <remarks>To be added</remarks>
+        <summary>Creates a BitArray with a specified length and default va=
lue.</summary>
+       <exception cref=3D"T:System.ArgumentOutOfRangeException"><paramref =
name=3D"length" /> &lt; 0.</exception>
+        <param name=3D"length">The length that the new BitArray should hav=
e.</param>
+        <param name=3D"defaultValue">The default value that each bit shoul=
d be set to.</param>
+        <returns>A new BitArray with a length of <paramref name=3D"length"=
/> bits,  each set to <paramref name=3D"defaultValue"/>.</returns>
+        <remarks>This implementation creates an int[] with a length of <pa=
ramref name=3D"length"/> / 32.</remarks>
       </Docs>
     </Member>
     <Member MemberName=3D".ctor">
@@ -280,10 +316,10 @@
 		<Parameter Name=3D"bits" Type=3D"System.Collections.BitArray" />
 	</Parameters>
       <Docs>
-        <summary>To be added</summary>
-        <param name=3D"bits">To be added: an object of type 'BitArray'</pa=
ram>
-        <returns>To be added: an object of type 'BitArray'</returns>
-        <remarks>To be added</remarks>
+        <summary>Creates a duplicate of a BitArray</summary>
+        <param name=3D"bits">The BitArray to duplicate.</param>
+        <returns>A clone of the <paramref name=3D"bits"/>.</returns>
+        <remarks>The clone that is created is a deap clone, that is, if th=
e new BitArray is modified, the old one will stay the same.</remarks>
       </Docs>
     </Member>
     <Member MemberName=3D"Item">
@@ -314,10 +350,12 @@
 		<Parameter Name=3D"value" Type=3D"System.Int32" />
 	</Parameters>
       <Docs>
-        <summary>To be added</summary>
-        <param name=3D"value">To be added: an object of type 'int'</param>
-        <returns>To be added: an object of type 'int'</returns>
-        <remarks>To be added</remarks>
+        <summary>The length of this BitArray.</summary>
+        <param name=3D"value">The new capacity for the BitArray.</param>
+        <exception cref=3D"T:System.ArgumentOutOfRangeException"><paramref=
 name=3D"value" /> &lt; 0.</exception>
+        <returns>The capicity for the BitArray.</returns>
+        <remarks>If the code which uses BitArray is able to anticipate the=
 number of items that will be required, it is best to set the property to t=
hat number to reduce the
+	amount of resizing performed.</remarks>
       </Docs>
     </Member>
     <Member MemberName=3D"Count">
@@ -327,10 +365,9 @@
         <ReturnType>System.Int32</ReturnType>
       </ReturnValue>
       <Docs>
-        <summary>To be added</summary>
-        <returns>To be added: an object of type 'int'</returns>
-        <remarks>To be added</remarks>
-      </Docs>
+        <summary>The number of items in this BitArray.</summary>
+        <returns>The number of items that are contained in this BitArray.<=
/returns>
+       </Docs>
     </Member>
     <Member MemberName=3D"SyncRoot">
       <MemberSignature Language=3D"C#" Value=3D"public virtual object Sync=
Root { get; };" />
@@ -339,9 +376,26 @@
         <ReturnType>System.Object</ReturnType>
       </ReturnValue>
       <Docs>
-        <summary>To be added</summary>
-        <returns>To be added: an object of type 'object'</returns>
-        <remarks>To be added</remarks>
+      <summary>
+          <para>Gets an object that can be used to synchronize access to
+      the current instance.</para>
+        </summary>
+        <value>
+          <para>A <see cref=3D"T:System.Object" /> that can be used to syn=
chronize access to the
+   current instance.</para>
+        </value>
+        <remarks>
+          <para>This property is read-only.</para>
+          <para> Program code must perform synchronized operations
+      on the <see cref=3D"P:System.Collections.BitArray.SyncRoot" /> of
+      the current instance, not directly on the current instance. This ens=
ures proper
+      operation of collections that are derived from other objects. Specif=
ically, it
+      maintains proper synchronization with other threads that might be si=
multaneously
+      modifying the current instance.</para>
+          <para>
+            <block subset=3D"none" type=3D"default">This property returns =
a reference to the current instance.</block>
+          </para>
+        </remarks>
       </Docs>
     </Member>
     <Member MemberName=3D"IsReadOnly">
@@ -351,9 +405,17 @@
         <ReturnType>System.Boolean</ReturnType>
       </ReturnValue>
       <Docs>
-        <summary>To be added</summary>
-        <returns>To be added: an object of type 'bool'</returns>
-        <remarks>To be added</remarks>
+<summary>
+          <para>Gets a value indicating whether access to the current
+      instance is read-only.</para>
+        </summary>
+        <value>
+          <para>Always <see langword=3D"false" />.</para>
+        </value>
+        <remarks>
+          <para>This property is read-only.</para>
+          <para>This implementation does not support read-only BitArrays.<=
/para>
+        </remarks>
       </Docs>
     </Member>
     <Member MemberName=3D"IsSynchronized">
@@ -363,9 +425,17 @@
         <ReturnType>System.Boolean</ReturnType>
       </ReturnValue>
       <Docs>
-        <summary>To be added</summary>
-        <returns>To be added: an object of type 'bool'</returns>
-        <remarks>To be added</remarks>
+        <summary>
+          <para>Gets a value indicating whether access to the current
+      instance is synchronized (thread-safe).</para>
+        </summary>
+        <value>
+          <para>Always <see langword=3D"false" />.</para>
+        </value>
+        <remarks>
+          <para>This property is read-only.</para>
+          <para>This implementation does not support syncronized BitArrays=
.</para>
+        </remarks>
       </Docs>
     </Member>
   </Members>

--=-At/txOOWuY5Bd5v+QRrT--