^^ most mods like that are far (far) from "efficient", as what Shadowed said. Nearly all (but not all) I have tested in the past use far more CPU time than nearly any other mod. Except, perhaps, QuestHelper.
Ones tested in the past (with
OptionHouse, CPU profiling enabled) below. None of them seem to vary much/at all in CPU usage whether you are idle and not targeting anything or targeting an enemy so that the buttons change color. All tested with the default Blizzard action bars and nothing else:
--
RedRange (tied for the worst, uses 24-28 CPU/second average which can potentially cause massive lag)
--
Buttonrange (similar, 25-28 average)
--
RangeColors (better than the above: 5.3-6 average. The latest version 2.14 is much improved over older versions which used double what RedRange does. It's still very high compared with most mods, though.)
--
tullaRange (far and away the best: 0.4-0.5 average. Its actually usable in a mod-heavy raid configuration)
There also used to be one called "ActionButtonColors" by "Nirriti" on Curse. It used around 18-20 CPU/second average; slightly better than RedRange/Buttonrange, but still outrageous. Does not seem to be downloadable anymore, though.
Unless you can improve on what Tuller has done with tullaRange, I wouldn't spend time on a new mod like this
. If you still want to, though, tullaRange uses a single global OnUpdate handler instead of one for each button, which appears to reduce CPU usage massively.