Fast and comprehensive binary serialization framework for Windows Phone 7
I am looking for a fast binary serialization framework to use in Windows Phone 7 for a project I am migrating from Windows Mobile 6.5 Protobuf-net works great in WM6.5, but it is still far from prime time in WP7, so I was wondering if anyone knows of a good alternative in the mean 开发者_C百科time.
I need a framework that supports serializing a wide range of types: custom types, arrays of custom types, collections of custom types, built-in types, serializable types in the framework,etc.
I have found a couple, but they are not that much faster than DataContractSerialization (but definitely more compact). I have tried so far:
Mike Talbot's Silverlight Serializer: http://whydoidoit.com/silverlight-serializer/
Alt Serializer for Silverlight: http://slserializelzo.codeplex.com/
Alt's performance is better, but is relying heavily on reflection and is not compiling serializers like its full framework counterpart, but both passed my first basic tests with relatively complex types.
Is there any other serialization framework that I could try? I will be happy to measure their performance and share my findings.
I've significantly improved the performance of SilverlightSerializer by using generic delegates that offer performance similar to native code calling. 61% increase in performance on my test harness. More details here.
Big plus for both Json.NET (http://json.codeplex.com) and Sterling Database (http://www.sterlingdatabase.com/). Both are free.
Marc Garvell's protobuf-net, a .NET implementation of Google's protocol buffers, is extremely fast. I'd recommend checking it out if performance is a priority.
精彩评论