[prev in list] [next in list] [prev in thread] [next in thread]
List: gnulib-bug
Subject: =?UTF-8?B?ZmluZCwgZnRzOiBkcmFtYXRpY2FsIGltcHJvdmVtZW50IG9mIHNwZWVkIGlu?= =?UTF-8?B?IGZpbmQ=?=
From: Askar Safin <safinaskar () mail ! ru>
Date: 2020-04-23 17:24:23
Message-ID: 1587662663.299580853 () f150 ! i ! mail ! ru
[Download RAW message or body]
Hi. It seems you missed my letter. This time I CC'd gnulib/find devs. I have gnulib/fts patch, which improves speed.
> Hi. I applied the following patch to fts.c from latest revision of gnulib (
> 47bf2cf3184027c1eb9c1dfeea5c5b8b2d69710d ):
>
> diff --git a/lib/fts.c b/lib/fts.c
...
>
> (If my mail client damaged this patch, you can see it here:
> http://paste.debian.net/hidden/c4eaca5b/ )
> Then I copied this patched fts.c to sources of "find" and "find" started to
> work significantly faster.
> Idea is this: if we are in FTS_LOGICAL mode, we don't need "stat" if we know
> this is not directory or symlink.
> Of course, I don't fully understand fts.c code, so, please, carefully review
> patch and make any needed additional changes (say, to comments).
>
> I got time decrease from 14.16 s to 9.21 s when searching in my home directory
> using this command:
>
> time -p sudo /tmp/sidabcn/root/findutils/find/find -O3 -L /home/user '(' -path
> '/home/user/Downloads' -o -path '*/.git' -o -path '*/Default' -o -path
> '*/dev/fd' -o -path '/home/user/opt' -o -path '*/node_modules' ')' -prune
> -false -o -type f > /tmp/st
>
> (Of course, I don't want to share my home dir, so you will not be able to
> reproduce my test, but you can still try to type something like "find -O3 -L
> /home")
>
> ==
> Askar Safin
> https://github.com/safinaskar
>
==
Askar Safin
https://github.com/safinaskar
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic