Not sure what your playerUpdateCast does. I guess it is not for the castbar right?
If it is your castbar you could check the castbar code from rCompassCastbar because I do not understand why it is called so often.
I enable OnUpdate when a cast event fires and catch the casting info on the first frame. After that it is just for value updates with an exception to cancel it if no stop event is triggered.
https://github.com/zorker/rothui/blo...stbar.lua#L270