From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#70036: 30.0.50; Move file-truename to the C level Date: Thu, 28 Mar 2024 11:51:06 +0000 Message-ID: <87il16tw0l.fsf@localhost> References: <87le63xzjt.fsf@thornhill.no> <87jzlmd831.fsf@localhost> <87v856wrj1.fsf@thornhill.no> <87r0futxj4.fsf@localhost> <875xx6y46j.fsf@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24646"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70036@debbugs.gnu.org To: Theodor Thornhill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 28 12:52:27 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 1rpoJ1-0006Dm-Nh for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Mar 2024 12:52:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpoIj-0003aj-1n; Thu, 28 Mar 2024 07:52:09 -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 1rpoIb-0003aQ-K3 for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 07:52:02 -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 1rpoIb-0004iY-6Z for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 07:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpoIb-0000ca-RN for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2024 07:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Mar 2024 11:52:01 +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.17116266712177 (code B ref 70036); Thu, 28 Mar 2024 11:52:01 +0000 Original-Received: (at 70036) by debbugs.gnu.org; 28 Mar 2024 11:51:11 +0000 Original-Received: from localhost ([127.0.0.1]:39243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpoHm-0000Z2-Nu for submit@debbugs.gnu.org; Thu, 28 Mar 2024 07:51:11 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:59195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpoHi-0000Xx-Mi for 70036@debbugs.gnu.org; Thu, 28 Mar 2024 07:51:10 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B130E240103 for <70036@debbugs.gnu.org>; Thu, 28 Mar 2024 12:50:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1711626659; bh=pDFDrS4FYhDwIx7dH/CojKH818PJG2gZ4/1YK2ur4Cc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=B4AayFEJOq9dED5fjgyqaPLiMIfy+MkwoZU8ijjsBkhirop/6Ofgggnh7a6s8K9jF 7IQyL5jqZAQadLv/KZKpijBFyEg9Y/N4tqNEkq5wvHTaa8KkipDqeeRCsjZSGTy0qZ eVtzDYAOfx2750C/5IcdfbFW9uE/tVacmlbBw+dCcAUZtoj9t91L/A8z7C0gj2TGmR 5zpuKuPAp65f8lcupVRw3oKiU8bX1LvQ3vdTp6/6P799gC/GJQa/Nx1//wFpx0b51e 3w1BbzqIFiUPnCwyUFqkWITtupFmseEA4qWBkZUlOdO7ZPs9RNTm+LWWO1mxbpS6Xu 14uUpwzBRv5mw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4V521G6ccjz9rxB; Thu, 28 Mar 2024 12:50:58 +0100 (CET) In-Reply-To: <875xx6y46j.fsf@thornhill.no> 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:282218 Archived-At: 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) > 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. > 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. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at