I assumed making a CancelOrder request would complete in under a second. However it seems highly variable.

I am cancelling all unmatched bets on a specific market and I sometimes see the request take up to 6 seconds to return.

Can anyone explain why it sometimes takes that long or how long I should expect it to take?

It also appears that the bets don't actually get cancelled until the moment the request returns, so what is happening prior to that?