Elitist Jerks

Elitist Jerks (http://elitistjerks.com/forums.php)
-   User Interface and AddOns (http://elitistjerks.com/f32/)
-   -   Kill your extraneous KTM CPU usage (http://elitistjerks.com/f32/t12298-kill_your_extraneous_ktm_cpu_usage/)

Antiarc 05/24/07 9:33 PM

Kill your extraneous KTM CPU usage
 
So, with the advent of the new addon profiling tools in 2.1, it's become pretty obvious that KTM is spending a TON of time processing all its onupdate handlers per frame. This is due to KTM's design, which uses a brute force polling system, rather than an event-driven system, so there's a lot of additional overhead incurred when there's no work to be done.

So, on a whim, I banged out this mod this afternoon. What it does, basically, is disable KTM any time there's nothing interesting going on, reclaiming valuable CPU-per-frame time.

You can get it at http://files.wowace.com/KTMCPUManager/KTMCPUManager.zip or through WowAceUpdater

It's basically about as fire-and-forget as they come. Install it and it does the rest. No config or anything to worry about.

On my machine, KTM consumes between 6% and 8% of my UI time per frame while CPU profiling is enabled. With the mod enabled, that drops to under 0.01%. This doesn't do anything to improve performance in combat, but you won't be wasting cycles sitting around Shattrath anymore, either.

Try it out, let me know what you think. Feedback is welcomed!

Miaxi 05/24/07 9:52 PM

Wow, that's awesome. Thanks a lot. :D

Intermission 05/24/07 9:54 PM

Just to clarify, there is no chance this will lead to bugs / missing data in combat?

Trying it now :)

Antiarc 05/24/07 9:58 PM

There is always that chance, but I believe it's solid. I erred on the side of caution, so if anyone in your raid as much as targets a hostile target, KTM will kick on. The idea is to keep it off when you're in situations that aren't anywhere near needing it.

Please do watch for discrepancies, but I do expect that it's safe.

Intermission 05/25/07 12:54 AM

Fair enough. Seems to work fine for me so far!

Sinzar 05/25/07 1:15 AM

So I'm just curious, since I don't fully understand CPU cycles and such. Is there something bad about a mod processing stuff while in town, etc? I read the description, saw that KTM runs code constantly while idle, immediately thought it sounds bad, but realized I don't really understand the inner workings of that kind of stuff.

I use KTM, and am always looking for ways to improve my UI. This mod won't improve any performance while in combat, which is about the only time performance matters very much. So, are there any negatives to more code running in town such as miniscule wear and tear on your CPU or something? I know, I sound noob, but I like to understand this kind of stuff, and the best way to learn is to ask :)

Antiarc 05/25/07 1:31 AM

There's nothing inherently bad about it, other than that it slows everything else down, including your framerate. Obviously, the ideal case would be increased combat performance, but this was "low hanging fruit", as it were, so I went for it.

Mech0z 05/25/07 5:48 AM

It sounds like it disables KTM when your not in combat but would it be possible (maybe a toggle) to make it only active in party/raids ?

Antiarc 05/25/07 11:40 AM

It does that already, Mech0z.

Intermission 05/25/07 12:19 PM

Raided with it tonight and worked fine.

Seemed to do pretty much what Antiarc said, just turns it off (window is still there, but nothing happening) until you're about to start the boss/trash. When people select a mob it kicks in I guess.

Thanks Antiarc! anything for a bit better performance running around Shattrath or GY running, etc.


All times are GMT -4. The time now is 12:28 AM.

Forum Infrastructure by vBulletin 3.6.12 ©2000-2007, Jelsoft Enterprises Ltd.