Subject: Re: New release?

Re: New release?

From: Steinar H. Gunderson <sesse_at_google.com>
Date: Wed, 28 Oct 2009 11:37:46 +0100

On Tue, Oct 27, 2009 at 08:43:22PM -0400, John Engelhart wrote:
> While I agree a linear scan of the queue isn't the most efficient means, it
> is the "easiest". Even with hundreds of packets in an unsorted linked list,
> just how much time is really spent running through the queue, anyways? Did
> profiling actually determine that this was a source of performance problems,
> or was this a case of "premature optimization"? At first glance, I'd say
> this is a case where the optimization hack greatly increases the complexity
> of the code, is a lot harder to get right, isn't a performance problem in
> practice, and is essentially nullified because ares_timeout() does a linear
> scan anyways.. and ares_timeout() is probably called once on each work loop
> pass for most end users of the library, as that's what's documented and
> given in the examples.

FWIW, if you're talking about the hash of doubly-linked lists, it was indeed
added after profiling real-world performance problems here at Google. I don't
know the specifics (I only forward-ported it from our internal repository
into c-ares CVS), but I'm pretty sure it wasn't made for fun. :-)

/* Steinar */

-- 
Software Engineer, Google Switzerland
Received on 2009-10-28