From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70036: 30.0.50; Move file-truename to the C level Date: Thu, 28 Mar 2024 13:47:27 +0100 Message-ID: <87zfuiwmjk.fsf@thornhill.no> References: <87le63xzjt.fsf@thornhill.no> <87jzlmd831.fsf@localhost> <87v856wrj1.fsf@thornhill.no> <87r0futxj4.fsf@localhost> <875xx6y46j.fsf@thornhill.no> <87il16tw0l.fsf@localhost> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1954"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70036@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 28 13:48:52 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rppBa-0000EA-Va for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Mar 2024 13:48:51 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rppBB-0003SY-HK; Thu, 28 Mar 2024 08:48:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rppAp-0003S1-HD for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 08:48:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rppAo-0003Cf-3E for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 08:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rppAo-0005rZ-FF for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 08:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Mar 2024 12:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70036 X-GNU-PR-Package: emacs Original-Received: via spool by 70036-submit@debbugs.gnu.org id=B70036.171163006222360 (code B ref 70036); Thu, 28 Mar 2024 12:48:02 +0000 Original-Received: (at 70036) by debbugs.gnu.org; 28 Mar 2024 12:47:42 +0000 Original-Received: from localhost ([127.0.0.1]:39529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rppAT-0005oV-Hh for submit@debbugs.gnu.org; Thu, 28 Mar 2024 08:47:42 -0400 Original-Received: from out-184.mta0.migadu.com ([91.218.175.184]:13907) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rppAQ-0005n1-2X for 70036@debbugs.gnu.org; Thu, 28 Mar 2024 08:47:40 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1711630050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NRnFQsmLBcEvYyzyQR4l6EzsfBnWWz+sjIt3girwMFc=; b=ybJyiSZupupU5wrsk8IUx+1iItFGO2HQTNchO0sjU9nSJVwndUxN5Wb6O2J2/fmiL9pq57 1m5YjxDwykI1zUbKoO3hZ9ae5dtZBcoN4VJBs8mAfy/ThGTAaz6T74638zaqbvY7+qfg4U VxwLOeL+kfDbt+wcLHFZjJh6rXYGIMvT10KxniQJd28/W/3DxSQVRfRKIXIBDThp+bh9wU P/lXOh2h5YCMtf65DtKdaoOdsLRBNLhZOgtMVGmrxGSBhIP0eLye1lMJxEYkWyY+13LFtg TToHITTQOHZxZzLqMlJEuYC7yyxX56HsRWsWZiBi9liGfP2DJxVqniDjFvjupQ== In-Reply-To: <87il16tw0l.fsf@localhost> X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282223 Archived-At: Ihor Radchenko writes: > Theodor Thornhill writes: > >> I'm sorry, but I don't see the real difference here. Yes, the profile is >> more detailed this way, but it doesn't change the fact that >> file-truename is slow, does it? > > It does not, but it is important for your suggestion to move > `file-truename' to the C level. > > If the slow parts of `file-truename' are the calls to C subroutines, > rewriting `file-truename' in C will not help much with the performance. > (Unless you try hard and move parts of the used subroutines into the C > implementation of `file-truename', but that will involve copy-pasting > parts of the existing code and cannot be a good idea without very strong > justification) > Yeah, I agree with this. >> The question to me is whether or not this is an acceptable performance >> hit to take for eglot given what it's trying to do, and my opinion is >> no. Whether or not it should be moved to C is open to suggestion. I'm >> preparing a patch that only targets Eglot by removing reliance on this >> function. > > If your aim is improving eglot performance specifically, sure. > If your aim is improving `file-truename' performance in general, a more > detailed analysis can be helpful. > And this. Wrt eglot specifically or not - I'm not sure whether or not this affects other parts of emacs. My guess is that it will, but I haven't investigated that yet. >> 17839 63% - command-execute >> 17794 63% - funcall-interactively >> 17793 63% - eval-last-sexp >> 17793 63% - # >> 17793 63% - elisp--eval-last-sexp >> 17791 63% - eval >> 17791 63% - benchmark-call >> 17788 63% - # >> 17783 63% - file-truename >> 17576 62% - let >> ... > > When you have recursive calls, it is generally more useful to view > reversed calltree (B) in the profiler report. It will accumulate calls > to the same function together, regardless on how deep in the call stack > these calls are made. > TIL - thanks :)