ForceDotComLabs/cloud-swarm — pull request #4 by MaNeForce (2013-09-12 13:14:16+00:00)
Title: Update SwarmHelper.cls

Included Account.OwnerId in the Opportunity Query. Build the acctOwnerIds Map in the Opportunity Loop (line 63).
This way we save 1 SoQL which may be more if the Trigger is executed multiple times

Same may also be applied for Cases