GNU bug report logs -
#64735
29.0.92; find invocations are ~15x slower because of ignores
Previous Next
Full log
Message #65 received at 64735 <at> debbugs.gnu.org (full text, mbox):
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: dmitry <at> gutov.dev, sbaugh <at> janestreet.com, 64735 <at> debbugs.gnu.org
> Date: Thu, 20 Jul 2023 18:29:43 +0000
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> No. It uses less excessive regexp matching Emacs is trying to do in
> >> file-name-handler-alist.
> >
> > Where do you see regexp matching in the profiles you provided?
>
> I did the analysis earlier for `directory-files-recursively'. See
> https://yhetil.org/emacs-devel/87cz0p2xlc.fsf <at> localhost/
>
> Just to be sure, here is perf data for
> (ignore (let ((gc-cons-threshold most-positive-fixnum)) (benchmark-progn (find-lisp-find-files "/home/yantar92/.data" ""))))
>
> 54.89% emacs emacs [.] re_match_2_internal
> 10.19% emacs emacs [.] re_search_2
> 3.35% emacs emacs [.] unbind_to
> 3.02% emacs emacs [.] compile_pattern
> 3.02% emacs emacs [.] execute_charset
> 3.00% emacs emacs [.] process_mark_stack
> 1.59% emacs emacs [.] plist_get
> 1.26% emacs emacs [.] RE_SETUP_SYNTAX_TABLE_FOR_OBJECT
> 1.17% emacs emacs [.] update_syntax_table
> 1.02% emacs emacs [.] Fexpand_file_name
>
> Disabling `file-name-handler-alist' cuts the time more than 2x.
Disabling file-handlers is inconceivable in Emacs. And I suspect that
find-file-name-handler is mostly called not from directory-files, but
from expand-file-name -- another call that cannot possibly be bypassed
in Emacs, since Emacs behaves as if CWD were different for each
buffer. And expand-file-name also conses file names. And then we
have encoding and decoding file names, something that with Find we do
much less. Etc. etc.
This bug report was last modified 1 year and 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.