Here is the situation:
The Silverlight 3 application enters the asp.net-enabled WCF service to get a list of items to display in the grid. After the list is knocked down to the client, it is cached in IsolStorage. This is done using the DataContractSerializer to serialize all of these objects in the stream, which is then encrypted and then encrypted. When the application restarts, it first loads from the cache (reverses the process above) and deserializes the objects using the DataContractSerializer.ReadObject () method. All this worked fine under all scenarios until recently with all the expensive "cache download" (decrypt / unzip / deserialize), in which there were only a few milliseconds.
On some development machines, but not on all (all Windows 7 machines), the deserialization process is a call to ReadObject (thread), it takes several minutes, it seems to block the entire machine, BUT ONLY WHEN IT WORKS IN A DUBGER IN VS2008. Running Debug configuration code outside the debugger does not cause problems.
One thing that seems suspicious is that when you include stop in Exceptions, you can see that ReadObject () throws a lot, many System.FormatException, indicating that the number is not in the correct format. When I turn off "Just My Code", thousands of them hit the screen. None of them are being processed. This happens as when reading from the cache and deserializing when the web service call is completed to receive data from the WCF service. HOWEVER, the same exceptions happen on my laptop development machine, which is not slow at all. And FWIW, my laptop is really old, and my desktop is 4 cores, 6 GB of RAM.
Again, no problem if it does not work under the debugger in VS2008. Does anyone else seem like this? Any thoughts?
: https://connect.microsoft.com/VisualStudio/feedback/details/539609/very-slow-performance-deserializing-using-datacontractserializer-in-a-silverlight-application-only-in-debugger
EDIT: , FormatExceptions. , " " - , , double.NaN, xml NaN... , DCS , , "NaN" et. . . , ... ... , . - , debugger/vs2008sp1, .