Lua performance profiling API

Is this related: What's up with RightClicking being reported as taking a lot of Render/CPU time?