Microsoft KB Archive/890929

= FIX: Time increases exponentially compared to the size of the data when your application uses the BinaryFormatter object to serialize and deserialize data that contains identical strings in the .NET Framework 1.1 =

Article ID: 890929

Article Last Modified on 4/7/2006

-

APPLIES TO


 * Microsoft .NET Framework 1.1

-





SYMPTOMS
When your application uses the BinaryFormatter object to serialize data structures that contain many identical strings, you may find that the time that is required to serialize and deserialize the data increases exponentially compared to the size of the data.



CAUSE
The internal mechanism for tracking object references for object graph serialization slows exponentially when the references all return a common value for the GetHashCode method. Strings with the same text all have the same value for the GetHashCode method.



RESOLUTION
A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that this article describes. Apply it only to systems that are experiencing this specific problem.

To resolve this problem, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

  Date         Time   Version        Size       File name --  03-Dec-2004  07:53  1.1.4322.2052  2,138,112  Mscorlib.dll 02-Dec-2004 21:12  1.1.4322.2052  2,519,040  Mscorsvr.dll 02-Dec-2004 21:13  1.1.4322.2052  2,506,752  Mscorwks.dll 02-Dec-2004 21:04                    10,912  Mscorlib.ldo



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



MORE INFORMATION
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

You can avoid this problem by not serializing and deserializing strings with the same value. However, the hotfix that is described in this article improves the hash code algorithm that is used. This hotfix improves the speed of serialization and deserialization. It also reduces the amount of data that is transferred. In some scenarios with many identical strings, you may notice improved performance.

Keywords: kbqfe kbhotfixserver kbnetframe110presp2fix kbfix kbbug KB890929

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.