Can anyone tell me why actionFunctions are not as fast as RemoteActions in Vf pages?
In the thread @sfdcfox have provided several good points.Posting some of them which are related to your answer:
@RemoteActionmethods require less bandwidth, and server processing time, because only the data you submit is visible and the view state is not transferred, while
apex:actionFunctionhas to transfer the page view state.
- There is almost always "one right answer" for which method should be used in a given situation. An auto-complete-as-you-type feature would benefit from
@RemoteAction, because less data is used, and so it is faster and more responsive; we don't need to modify the view state, so this is a major bonus for the user. Updating the page's view state to show new Visualforce elements, in contrast, would best be served with
@RemoteActionwould force the developer to manage the DOM themselves, which can be more burdensome.