From owner-freebsd-hackers Mon Oct 16 12:15:29 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id MAA17832 for hackers-outgoing; Mon, 16 Oct 1995 12:15:29 -0700 Received: from aslan.cdrom.com (aslan.cdrom.com [192.216.223.142]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id MAA17826 for ; Mon, 16 Oct 1995 12:15:26 -0700 Received: from localhost.cdrom.com (localhost.cdrom.com [127.0.0.1]) by aslan.cdrom.com (8.6.12/8.6.9) with SMTP id MAA18887 for ; Mon, 16 Oct 1995 12:15:07 -0700 Message-Id: <199510161915.MAA18887@aslan.cdrom.com> X-Authentication-Warning: aslan.cdrom.com: Host localhost.cdrom.com didn't use HELO protocol To: hackers@FreeBSD.org Subject: Speeding up last. Date: Mon, 16 Oct 1995 12:15:07 -0700 From: "Justin T. Gibbs" Sender: owner-hackers@FreeBSD.org Precedence: bulk Anyone looking for a good little "efficiency" project? Wolfram? :) Last takes a *tremendous* amount of CPU time to do what you would think is a simple task. Just try to use last on a busy ftp server and you will get an idea of the problem. Just counting the number of ftp logins in a 15 day old wtmp on wcarchive took 16 hours! (36MB wtmp file). David Greenman looked into the problem a bit and thinks that the strcmp() calls are the culprit... last does ~10 of them per entry. Even with 10 strcmps, it shouldn't take this long... -- Justin T. Gibbs =========================================== Software Developer - Walnut Creek CDROM FreeBSD: Turning PCs into workstations ===========================================