From owner-cvs-lib Thu May 2 08:45:19 1996 Return-Path: owner-cvs-lib Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA05257 for cvs-lib-outgoing; Thu, 2 May 1996 08:45:19 -0700 (PDT) Received: (from wpaul@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA05224 Thu, 2 May 1996 08:45:00 -0700 (PDT) Date: Thu, 2 May 1996 08:45:00 -0700 (PDT) From: Bill Paul Message-Id: <199605021545.IAA05224@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-lib Subject: cvs commit: src/lib/libc/yp yplib.c Sender: owner-cvs-lib@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 96/05/02 08:44:58 Modified: lib/libc/yp yplib.c Log: NIS client-side performance tweak: Each of the ypclnt functions does a _yp_dobind() when it starts and then a _yp_unbind() when it finishes. This is not strictly necessary and it wastes cycles: it means we do a new clnt_create() and clnt_destroy() for each yp_whatever() call. In fact, you can do multiple clnt_call()s using a single RPC client handle returned by clnt_create(). Ideally we only have to create a handle to ypserv once (the first time we call a ypclnt function) and then destroy it and rebind only if a call to ypserv fails. - Modify _yp_dobind() so that it only creates a new RPC client handle when establishing a new binding or when one of the ypclnt calls invalidates an existing binding and calls _yp_dobind() to establish a new one. - Modify the various ypclnt functions to only call _yp_unbind() if a call to ypserv fails. Revision Changes Path 1.18 +108 -79 src/lib/libc/yp/yplib.c