I've got a workflow For Each action that contains 6 query xml actions, and a 'build string' at the end to compile those XML queries into a string. When it's looping 2-4 times it's taking well over 30 minutes to run when it loops only 4 times (sometimes nearly an hour).
This seems excessively long to me, but I'm mainly used to working in on-prem Nintex WF. Is Safe Looping turned on in 365 workflows by default? Is that likely what is causing this horrendous lag?
Does anyone have any ideas on potential avenues for speeding this up?
This kind of time is not really expected.
Is there anything else in the loop other than query XML action?
Can you PM me a workflow history URL for an example that took a lot of time, I'll take a look into it for you.
I have always experienced the same ridiculous lag on these actions. Been that way for at least 1.5 years, and hasn't really shown signs of improvement. I've done a few posts and help requests on it, but it hasn't really ever gone anywhere.
Been a while since I looked at the couple of workflows doing these actions, but I feel like it was the combination. A single query XML goes pretty quick, but the subsequent ones inside the foreach are what take a while. By themselves I havent really noticed an issue, but together it definitely goes slower than I would figure it should.
I am also observing this sort of issues. I even decided to remove the Query XML action and replace it with regular expression. I don't know why this is lagging so much.
It then suddenly changed, and so a single loop needed around minute, what still is a lot regarding the fact, that XML is small and a rule is easy, but was acceptable. But I see, as the problem still occurs, that my transition to regular expression was a good move.
Interesting, thanks guys! That lag period was killing my process, so I’ll take your advice Tomasz and replace my Query XML with some Regex Extracts. Hopefully that speeds this up a bit, because the workflow I just ran with 12 loops just took over an hour!
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
Just a quick update on this one : I changed it the actions from Query XML to Regular Expression and it works much quicker now. 10 minutes whereas before it would take over 30 minutes.
So obviously Query XML + For Each = Lagtown...