[Ecls-list] directory function and stat system calls

Robert Dodier robert.dodier at gmail.com
Sat Dec 19 18:55:07 UTC 2009


On 12/18/09, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:

> No, you are not seeing the same behavior as before. Before, if ECL wanted to
> list a directory of /var/tmp/foo/a.txt it would run through the directory
> chain "stat-ing" the content of /var, /tmp and /foo Now it only does what is
> expected: it lists the content of each directory, and only inspect those
> that match the masks "var", "tmp", "foo" and "a.txt" There are thus only a
> few calls to "stat" which HAVE to be done: "var", "tmp", "foo" have to be
> verified not to be files, and for "a.txt" we have to verify it is not a
> symbolic link or return its true name.

OK, I tried it again, and I see a reduction in stat calls now;
before the executable was linking to the previous libecl.so,
so I didn't see any change.

Some of the unneeded calls to stat have gone away, which
is good. However there are still some unnecessary calls to stat,
e.g. (directory (pathname "/var/tmp/foo")) stats everything
in in /var/tmp and (directory (pathname "/var/tmp/foo/quux.1"))
stats everything in /var/tmp/foo.

FWIW

Robert Dodier




More information about the ecl-devel mailing list