ResourceServer provides a proxy for WoW's profiling functions. Using the functions themselves in your addon uses up resources, so ResourceServer polls all addon memory and cpu usaage, then offers methods like GetMemUsage(addon) and GetCPUUsage(addon). This way you can display your own addon's resources without tainting the data with the overhead of updating profiling data. This is a developer's tool, and I strongly recommend you use it if you're profiling your addon's memory from StarTip's resource functions.
environment.GetMemUsage = ResourceServer.GetMemUsage
environment.GetCPUUsage = ResourceServer.GetCPUUsage
environment.GetFramerate = self.GetFramerate
environment.Debug = ResourceServer.Debug
environment.DebugMem = ResourceServer.DebugMem
environment.DebugCPU = ResourceServer.DebugCPU
environment.scriptProfile = scriptProfile -- Whether CVar("scriptProfile") is true or not
I'm unable to reproduce the problem I was having. CPU wasn't really the issue. It was memory. And what's weird is when I called UpdateAddOnMemoryUsage and UpdateAddOnCPUUsage every 500ms or so it would bog down the WoW client like crazy. I mean, to a point where you couldn't do anything but kill the process. It's no longer doing that. I can call it at every frame update no problem, in fact, although frame rate drops. At first I thought it was due to not having any addons loaded besides the test addon, but it's the same with all the addons loaded. I even went through revision history and grabbed the file from back when I had this problem, but the issue's not happening. I'm stumped. I created ResourceServer on Sep. 1st. Did Blizz change anything since then?
This is good news as far as I'm concerned. If there's in fact no issues, then I can quit suggesting people use ResourceServer when using their own addon to profile that addon's resources. I can also quit using a timer widget to update data when ResourceServer's not present since it no longer kills the WoW client updating it in realtime.
It just became apparent where this addon is useful. When I mouseover units without updating on a timer -- update in real time in other words -- then I get some lag at every mouseover. Using ResourceServer prevents this.