[1922] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: Cygnus changes for your consideration

daemon@ATHENA.MIT.EDU (Ken Raeburn)
Thu Oct 31 17:16:55 1996

To: Ezra Peisach <epeisach@MIT.EDU>
Cc: "Theodore Y. Ts'o" <tytso@MIT.EDU>, Mark Eichin <eichin@cygnus.com>,
        krbdev@MIT.EDU
From: Ken Raeburn <raeburn@cygnus.com>
Date: 31 Oct 1996 17:13:37 -0500
In-Reply-To: Ezra Peisach's message of Thu, 31 Oct 1996 13:13:44 EST


> The fast asn1 date encoders I think were attempts by Ken to take away
> from the bottlenecks in sending timestamps using essentially _doprnt internally.

It was actually a combination of things Mark and I came up with.

 * Several changes got us from formatting a time string to picking
   apart numbers and filling in bytes.
 * A small 4- or 5-entry cache bypasses all the work for time values
   recently converted.  I think you'll tend to get more cache hits under
   higher load.  I'd have to look over the code to confirm it, but that
   was the behavior I saw in my profiling tests.
 * A few functions were made inline if gcc is used.

This reminds me -- there was some time field which was supposedly
optional, but our code was always encoding it, even when it was zero.
I even created a special non-expiring cache entry for it, though I
didn't initialize it.  Did anyone ever figure out if it was safe to
omit it?  (Not for 1.0, but for afterwards.)  I recall some concern
about DCE compatibility.  Bill, have you looked into that?

> The non-use of calloc I believe would be a win as we zero the memory when we
> need it anyway - so why do it twice.

In most of the cases I looked at, I think the memory was completely
overwritten, but not explicitly zeroed outside the calloc call.  Still
amounts to redundant stores.

home help back first fref pref prev next nref lref last post