Save ViewState to server - deserialize is very slow

M

mohaaron

Can anyone tell me why when trying to use the following code to
deserialize the viewstate it takes a long time with a large viewstate.
This really surprised as the viewstate is big, but not that big. The
formatter.Deserialize method takes a couple seconds which is a long
time.

protected override object LoadPageStateFromPersistenceMedium()
{
object viewState;
string tempViewState;
tempViewState = (string)this.Cache["ViewState"];
LosFormatter formatter = new LosFormatter();
try
{
viewState = formatter.Deserialize(tempViewState);
}
catch(Exception x)
{
throw new HttpException ("Invalid viewstate:" + x.ToString());
}
return viewState;
}
 
M

mohaaron

Peter,

Thanks for the reply. I have seen this article and currently have my
solution working in a similer way. I am still wondering why the
Deserialize method is soo slow with a large viewstate. I would expect
that this would be handled a lot better.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top