UpdateActionState is slow, significant % of frame time is spent in that OpenVR function
I see the UpdateActionState call take a significant % of my games performance. On average, that function alone takes 0.3 ms. Is it supposed to take so long?
I am profiling on an i7 5820k, with newest SteamVR beta.
Is it normal that it takes 0.3 ms, and that can't be improved in any way? 0.3 ms is a lot for something like this when you only have a frame budget of 6.9 ms on 144 hz. In issue #925, it was said that the function is "mostly a bunch of lockless shared memory reads", and I think that surely shouldn't take 0.3 ms?
I see this same function take up about 7-8% of my game thread. As mentioned by OP, with Index at 144hz it is a significant fraction of the available time.
I'd like to bump this because I still see the exact same issue. UpdateActionState takes roughly 10% of my CPU frametime with the most recent SteamVR version, measured with the Visual Studio Profiler, which seems way too much for that function.

I am sure UpdateActionState could be optimized a lot resulting in a ~10% CPU performance boost for a lot of SteamVR games.
First, we don't know how IVRIput::UpdateActionState() is implemented under the hood, the only thing we know from the description is that it updates all actions, no matter how many there are, all of them get updated.
Because we don't know how it works under the hood we can't say it can be optimized at all, it could be using some inefficient container but it might as well be using a very efficient one instead, we can't say for sure.
Personally I decouple input handling from my render thread, I hate to have performance like VRChat, specially knowing what usually happens in drivers on input updates... Trust me 10% is not that bad even, it can be way worse...
We are encountering an issue with this where if the user takes off their headset for a short period of time and after putting the headset back on the CVRInput.UpdateActionState calls a native function in openvr and its using 50% of the CPU time.