Binding to a server is an investment of time that you want to use carefully. Bind once; call often. Cache server bindings and reuse them as much as possible. Do not get a new binding each time for an RPC, to then throw away when the call is done. While it may be easier to code library routines and object methods that way, it can make a difference in your application's performance.

Structuring a name space can also impact binding performance. Profiles and groups add a lot of flexibility, but it takes longer to fetch the members of a group or profile than it does to read the contents of a server entry. For each member of the group or profile, the contents of that member have to be processed. If you have a deep hierarchy of profiles and groups, the binding code could check lot of entries before it finds one that matches the binding request. A strategy to consider is to start with a single well-known server name, and then try a group or profile if that fails.

CDS provides for client-side caching of directory information, and that caching can dramatically improve binding performance. Do not disable caching unless it is absolutely necessary. The best strategy is to optimize for the successful case. Do initial lookup with caching enabled. If the call fails using the returned binding, go back and do the lookup with caching disabled to get the latest up-to-date server bindings and repeat the call.


[Back] [Next]