]> git.ipfire.org Git - thirdparty/samba.git/commit
Fix bug #8395 - optimize serverid_exists() for Solaris.
authorIra Cooper <ira@wakeful.net>
Mon, 22 Aug 2011 19:46:41 +0000 (12:46 -0700)
committerKarolin Seeger <kseeger@samba.org>
Fri, 16 Sep 2011 18:41:58 +0000 (20:41 +0200)
commit76eb41461c670c23838e27e3cc7b7d6d4fd661a4
tree19ba6ace2952afb5a83d813730ca66bc4875efd5
parentd70a522a02abc90a6773ad32a4fa5baeedc89d11
Fix bug #8395 - optimize serverid_exists() for Solaris.

jra asked:

    Do you have any idea on how many calls it saves,
    and what help the optimization gives ?

As far as calls: Not 100% sure, dtrace pointed the issue out to me, and when I
saw 10-50%(Or more), I looked for an easy fix.

The real expense here is the fnctl locks on the database.  That's pretty
painful.  1000ns per call, and probably 3-4 calls in that chain.  So it doesn't
take much to come out ahead was my math.
(cherry picked from commit 9bf2b3034b4c9523bfac779e518a2a1a6d76ef46)
source3/lib/serverid.c