![]() |
![]() |
![]() |
Marshalling UDT, Parameters, or Array Can any of you COM experts tell me what is the most efficient one to marshall cross-process?
Been Searching
It's not that one or the other is more efficient (although marshalling a variable sized array also means marshalling the element count somewhere). An array of 8 ints would be equivalent to marshal as a UDT with 8 ints in it.
Brad Wilson (dotnetguy.techieswithcats.com)
Okay, but how about those compared to passing multiple parameters?
Been Searching
The amount of data marshalled is still essentially the same.
Brad Wilson (dotnetguy.techieswithcats.com)
It depends on the memory copy call too, if you switch between kernel mode and user mode a lot your software will shit itself in a hurry in the wrong situation (like scalability).
Li-fan Chen
If you dont' copy by value, the other process has to marshall every request of every node (pointer or not). Copy by value gives the consumer a copy of the data (eliminating the transport cost)
Li-fan Chen
Ok, I guess a list of parameters is just an array when it comes down to the assembly anyway right? So, all three must be similar.
Been Searching
|