Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Optimal way for branching in orchestrations › Re: Optimal way for branching in orchestrations
micbox,
I’m not too sure, however given that you can see the C# that is created from an orchestration when it is compiled…
You could try both in the same orchestration, compile it and look at the C# to determine whether one ‘looks’ more efficient than the other. I would imagine that the decide shape will be compiled into an if…then statement.
One further point to consider is whether you will actually see any real performance benefit of doing the branch as if statements or decide shapes. I would suggest that in this case readability is more important than any performance gain you are likely to achieve. I always adopt a decide shape over if…then in an Expression Shape as the latter hides the meaning of the code, especially when you are looking at the orchestration in the debugger.
Hope this helps, Nick.
Nick.