2012-07-18 9 views
6

私は、2D世界で最速のシリアル化メソッドタイルを探しています。世界は大きいと言いますが、コンピュータが同時に多くのブロックを読み込むことができないので、私は世界を塊に分割しました。 BinaryFormatterが遅いようです。チャンクオブジェクトをシリアライズする方法はありますか?高速シンプルなオブジェクトのシリアル化

WChunkオブジェクト構造

public class WChunk 
{ 
    public int ChunkX; 
    public int ChunkY; 
    public SortedDictionary<WPoint, WTile> Tiles; 
} 

WTileオブジェクト構造

public class WTile 
{ 
    WPoint Location; 
    int Data; 
} 

答えて

12

に私の知る最速のオプションがProtocol Buffersです。

性能比較がここにあります(感謝@Andrei)

http://theburningmonk.com/2011/08/performance-test-binaryformatter-vs-protobuf-net/

enter image description here

.NET実装

http://code.google.com/p/protobuf-net/

http://code.google.com/p/protobuf-csharp-port/

+2

protobuf-netとバイナリフォーマッタの比較http://theburningmonk.com/2011/08/performance-test-binaryformatter-vs-protobuf-net/ –

+0

そのポインタをありがとう。そのリンクの回答を更新しました。 –

+0

ありがとうございます。 –

関連する問題