addAction command has condition field which has to return true in order for the user added action to show in action menu (mouse wheel scroll). This condition field is evaluated every frame, so if you have 60 FPS the code in it will run 60 times a second.
With 10 custom actions added you get 600 script executions a second for absolutely no reason. What is the point to run condition check on action that is hidden when action menu is not in use? Why not to make it like with map "DRAW" event, execute only when menu is visible?