Browser gets stuck while the "clone" and "undo" routines are executed by the SaveAsync method

Browser gets stuck while the "clone" and "undo" routines are executed by the SaveAsync method

Old forum URL: forums.lhotka.net/forums/t/11990.aspx


Dakianth posted on Monday, May 20, 2013

I'm having a problem during a SaveAsync method call in my Silverlight ViewModelBase. When my model 's graph gets too bloated, the "clone" and "undo" routines are taking a long time and the window gets stuck due to the synchronous process, if the user try to click on screen, the browser crashes. Consider putting the "clone" and "undo" routines in a task.

code: http://take.ms/VxPdtq

ColourHaze replied on Thursday, May 30, 2013

Could it be a browser issue. Im not an expirienced sulverlight user, but I do know IE has its quirks!

Sometimes IE10 even handles things even more worse than IE9!

Worth a shot?!

Dakianth replied on Monday, June 03, 2013

The problem isn't browser, when you run a process in the same thread of the browser, if the process take time , the Tthread goes wait for the process conclusion, including the browser. The best solution is to run lengthy processes into separated threads

JonnyBee replied on Monday, June 03, 2013

Hi,

I assume this is due to having a very large object graph?

Have you considered the Diffgram approach as shown in the Samples\NET\cs\Csla.DiffGram sample? 

I have also seen quite a performance improvement on using private backing field and [NotUndoable] attriute for fields that are not editable by user and/or [NonSerialized] for properties that are not required in the cloned object for save.

 

Copyright (c) Marimer LLC