Codeusa/Borderless-Gaming — pull request #52 by madpew (2014-04-03 17:48:24+00:00)
Title: some performance changes to fix issue #51

I stumbled upon issue #51 and did a performance analysis, figured out that Process.MainWindowHandle uses most of the CPU-Time spent by BorderlessGaming (it's still not that much).

This PR reduces the calls to this property by moving around portions of code.
Also I added a Sleep into the update loop after accessing the property to spread out the load over time to flatten the "spike" encountered/described in issue #51.

TLDR: This PR pushes my CPU-load down to 0% flat