The Remote Procedure Call (RPC) component gives the administrator and application developer very precise control of the level of security used for making RPCs. However, security has its cost, so it is recommended that the application use the minimum level of security that meets requirements. Integrity and privacy levels can be very costly for large data.
If you are handling a series of RPC calls over time, you can increase speed by using a context handle, which causes the RPC runtime to keep an active connection between client and server. This avoids the cost of connection setup and teardown, typically done after about 10 seconds of inactivity.
There are some differences in performance characteristics of the different protocol sequences and their associated transports. Connection-oriented (CN) is quicker to detect a down server, but does not scale as well as datagram (DG), because the server needs a separate connection and connection receiver thread for each concurrently active client. At small data sizes CN and DG have similar performance, but CN is slightly faster at large data sizes.