From owner-cvs-src@FreeBSD.ORG Fri Mar 11 23:27:46 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94A5416A4CE; Fri, 11 Mar 2005 23:27:46 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7850D43D2F; Fri, 11 Mar 2005 23:27:46 +0000 (GMT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j2BNRkc5052261; Fri, 11 Mar 2005 23:27:46 GMT (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j2BNRkGq052260; Fri, 11 Mar 2005 23:27:46 GMT (envelope-from njl) Message-Id: <200503112327.j2BNRkGq052260@repoman.freebsd.org> From: Nate Lawson Date: Fri, 11 Mar 2005 23:27:46 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/fs/msdosfs msdosfs_conv.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 23:27:46 -0000 njl 2005-03-11 23:27:46 UTC FreeBSD src repository Modified files: sys/fs/msdosfs msdosfs_conv.c Log: The mbnambuf routines combine multiple substrings into a single long filename. Each substring is indexed by the windows ID, a sequential one-based value. The previous code was extremely slow, doing a malloc/strcpy/free for each substring. This code optimizes these routines with this in mind, using the ID to index into a single array and concatenating each WIN_CHARS chunk at once. (The last chunk is variable-length.) This code has been tested as working on an FS with difficult filename sizes (255, 13, 26, etc.) It gives a 77.1% decrease in profiled time (total across all functions) and a 73.7% decrease in wall time. Test was "ls -laR > /dev/null". Per-function time savings: mbnambuf_init: -90.7% mbnambuf_write: -18.7% mbnambuf_flush: -67.1% MFC after: 1 month Revision Changes Path 1.40 +42 -37 src/sys/fs/msdosfs/msdosfs_conv.c