Re: dev_get_by_index is not hashed: O(n)

From: David S. Miller (davem@redhat.com)
Date: Wed Aug 28 2002 - 03:29:32 EST


   From: Ben Greear <greearb@candelatech.com>
   Date: Wed, 28 Aug 2002 01:31:25 -0700

   So, for the record, is 44 seconds on a high-end machine acceptable
   for ifconfig -a on 4000 interfaces? It doesn't bother me enough to
   re-write a patch that will never be accepted, but if it were my code,
   I'd change it to make it faster :)

You showed 'ip' can do it in 5, 5 is certainly acceptable :-)
ifconfig can be implemented in terms of 'ip' (I thought most
dists were doing this already too) so it's basically a moot
point what ifconfig can do.

BTW what kind of tty did you send the output too? Maybe retry with
/dev/null :-)

And if you list 4000 interfaces, what are you going to do with the
output? Read it with your eyes? Grep stuff? If the latter, put the
ifconfig output into a file once, then do all your grep'ification
passes on the file.

But again with 'ip' it is 5 seconds... it really isn't an issue.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html



This archive was generated by hypermail 2b29 : Sat Aug 31 2002 - 22:00:01 EST