N-Level Undo performance in Silverlight

N-Level Undo performance in Silverlight

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


decius posted on Wednesday, October 07, 2009

Because of the trimmed CLR of Silverlight (specifically it's reflection library), I see that Csla has used its IMobileFormatter serialization as its solution to n-level undo, correct? The downside I am seeing to this is a pretty significant performance bottleneck. Are there any techniques/tips that someone can offer to increase performance? Right now I'm just planning to roll my own N-level undo. Has anyone else had the same experience with this in Silverlight?

RockfordLhotka replied on Thursday, October 08, 2009

If you do roll your own you'll effectively be creating a new formatter. If you have good luck making your formatter substantially faster than MobileFormatter please let me know, as I'm always looking for ways to improve its performance while maintaining its functionality.

decius replied on Thursday, October 08, 2009

Sorry rocky, I should have been more descriptive. When I say "roll my own" I mean I am going to create a custom implementation that will clone and backup my own class by explicitly calling the peices I want to back up one by one. I'd love to have the maintainability of a framework that could do this for me, but the current app I'm working on isn't too complex and the payoff is too great to ignore (takes the backup operation down from a couple seconds to a couple milliseconds).

I've also noticed this drag in performance with clone operations in SL as well. I suppose this alludes that the current serialization process is quite intensive. I mean this to be a constructive criticism, because I am utterly greatful for everything Csla provides for me.

Perhaps I'll take that challenge on in the future though to see if there's anything I can contribute.

RockfordLhotka replied on Thursday, October 08, 2009

I take no offense at valid feedback. I know MobileFormatter isn’t as fast as we’d all like, but the problem it is addressing is complex. Any opportunity to make it better/faster is something I’ll welcome! :)

 

Are you just hard-coding the process of copying the property values?

decius replied on Friday, October 09, 2009

Yes exactly, I'm just hard code copying property values. Like I say, it's a poor solution for maintenance I know, but this project isn't too complex, so it actually is a viable solution.

Copyright (c) Marimer LLC