Odpovědět In-memory inflation of Message objects

  • 27. listopadu 2006 17:01
     
     

    Hi,

    I'm in a position where using streamed message mode in WCF wouldn't be possible (using RM and security) so I was wondering if anyone in here knows how much WCF inflates Message objects in memory (when using RM + Sec in buffered mode)?

    Are we talking 1.3 x the payload size? 2x? 10x?

    Thanks,
    Pat

Všechny reakce

  • 1. prosince 2006 18:10
     
     Odpovědět

    There is no direct correlation between wire size of a message and "memory footprint" of a message. Ultimately we read the wire format of the message into memory, and then we create the appropriate XmlReader on top of the byte[] in order to expose the message format. Streaming is for the case where you don't want to buffer the message into memory because you are incrementally handling and throwing away pieces of the message.

    Sorry for the indirect answer, but I'd need to know exactly what you are asking for in order to give a more focused answer here.

  • 4. prosince 2006 8:25
     
     

    Hi.

    Would you mind explaining in a bit more detail what exactly you mean when you say that there is no "direct correlation between wire size of a message and memory footprint"?

    My case involves receiving several SOAP messages with very large payloads, so the size of headers and the like could most probably be ignored.

    Also, since we're using RM and Security, there will be some diffuculties in implementing streaming, seeing how both RM and sec. needs buffered messages.

     

    Thanks,

    Pat