Serialization performance

  • Thread starter Thread starter Joe
  • Start date Start date
J

Joe

I have a strange problem. I'm serializing a class which takes < 2 seconds on
a couple of machines but other machines this same process can take 1-2
minutes. Is there any way to track this down?

-Joe
 
Hi Joe,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that some of your machine will take about
1-2 min to do the serialization process. If there is any misunderstanding,
please feel free to let me know.

This depends on how you serialize your class. Also, is there any security
setting on you machine that requires certain permission sets on the
machine? Please also try it on a clean machine to see if it works fine.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Hey Joe, I like the name. You stated that its taking 2 seconds to serialize
'a class', is this one class occuring once?! Because to state that its
taking <2 seconds instead of 2 milliseconds or whatever is a huge
performance issue. What kind of class is this? Are you doing serialization
through the .net framework or is this a custom job? How about a code
example?

Regardless I would suggest using
http://www.red-gate.com/products/ants_profiler/ , they got a generous trail
offerr and its a great price for what this does. And 2.0 compatable.
 
To answer your and Kevin's questions: There are no security issues to worry
about. The serialization completes on any machine but some are much, much
faster.

I have one class which contains a number of other classes. Some of these
classes inherit from CollectionBase others don't.

I'm using the BinaryFormatter.Serialize() method.

The 2 machines which serilize in < 2 seconds are both Win 2003 servers. The
machines that take longer (anywhere from 30 seconds to 2 minutes) are Win XP
pro & Win 2k pro.

We're testing the exact same data on each machine.

I'll check out the links..

Thanks,
Joe
 
Hi Joe,

Please also check if windows xp sp2 and .net framework 1.1 sp1 has been
applied to the machines that takes long time for serializations.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
I did verify that the machines have SP2 for XP and framework SP1. But, one
of the machines is Win2k pro.

Any suggestions as to what could cause this?
 
Hi Joe,

It's hard to explain why this happens on these machines. Does all the win
xp machines has a performance hit of this issue? In this case, I strongly
recommend you use the profiler that another Joe has suggested to see which
code is blocking this.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top