|
From: | Eric Blake |
Subject: | Re: [bug #30868] Take advantage of dirent.d_type to save a stat() |
Date: | Tue, 24 Aug 2010 16:26:01 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2 |
On 08/24/2010 04:22 PM, Nick Welch wrote:
URL: <http://savannah.gnu.org/bugs/?30868> In lib/savedir.c, in isdir1() (or the code that calls it), the d_type member of the dirent struct can be checked instead of doing a comparatively expensive isdir() (which calls stat()).
Thanks for the suggestion; adding bug-gnulib, since this code is maintained there and shared by several projects.
-- Eric Blake address@hidden +1-801-349-2682 Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |