It is not an attack. It's an issue in the miner that doesn't handle large block efficiently. A fix is being tested. Both the stock miner and mikaelh's miner are impacted.
I tried taking the creation of a new block template outside of the loop, and it still seems to be affecting me.