Following are the best practices you should follow for optimal performance.
Use OIDs wherever possible. Using the LDAP method of lookup using Resource Names affects performance.
On getXXXXInfo() calls, use fullDataSet option only when necessary. Passing a value of true for fullDataSet argument retrieves all the associations, and affects performance.