.NET Troubleshoot performance degradation when returning custom datasets

While developing a client / server system using .NET Remoting (.NET 2.0) for communication, I encountered extremely strange behavior if my remote objects return custom datasets. For some reason to remove the infrastructure to handle the set instance is emptyon the client side it takes 0.5 to 4 seconds if I'm using a binary formatted TCP pipe (fastest option!). The behavior is as follows: after a clean startup, the client can make so many calls to the server, receiving a custom dataset in tens of milliseconds; after resting for 4-5 minutes (no calls to the far side during this time), each subsequent call to the far side that returns a custom dataset takes 0.5 to 4 seconds. If the remote call returns anything other than a custom dataset, everything is done again in tens of milliseconds. If I change the remote access configuration to a binary formatted HTTP channel everything works flawlessly. I am using this configuration as a workaround, but this is not a solution, but a workaround.

A custom dataset is created by creating a new XSD dataset and dragging the table from Server Explorer (SQL Server) and then removing some of the table adapters from the dataset.

I've created a boneless testing project ( download ) that demonstrates the behavior I'm talking about. I have included a ReadMe file with instructions on how to reproduce the problem.

Thank!

PS. This was the original question , but I've now narrowed it down to custom datasets, which seems to be the culprit, so please don't mark it as a duplicate.

0


source to share


3 answers


You can try a few steps from this article I have used some of them before and it has had a significant improvement.



+1


source


Check out this article and make sure you are serializing your dataset using the correct format. http://msdn.microsoft.com/en-us/magazine/cc163911.aspx



0


source


During my research, I came across an article about the serialization format. This is why I have this case as a separate option in my test project. Adjusting the BinaryFormat manually increases the processing time from 0.5 to 4 seconds.

0


source







All Articles