From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70036: a fix that Date: Thu, 18 Apr 2024 18:49:50 +0300 Message-ID: <86y19ad61t.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23015"; mail-complaints-to="usenet@ciao.gmane.io" Cc: felician.nemeth@gmail.com, 70036@debbugs.gnu.org, theo@thornhill.no To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 18 17:51:12 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 1rxU2a-0005jA-25 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 18 Apr 2024 17:51:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxU2G-0001ww-Cs; Thu, 18 Apr 2024 11:50:52 -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 1rxU2D-0001wQ-HP for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 11:50:49 -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 1rxU2D-0002vF-70 for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 11:50:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rxU2Q-00028s-Hn for bug-gnu-emacs@gnu.org; Thu, 18 Apr 2024 11:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 18 Apr 2024 15:51: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.17134554187892 (code B ref 70036); Thu, 18 Apr 2024 15:51:02 +0000 Original-Received: (at 70036) by debbugs.gnu.org; 18 Apr 2024 15:50:18 +0000 Original-Received: from localhost ([127.0.0.1]:53155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxU1g-00022n-7l for submit@debbugs.gnu.org; Thu, 18 Apr 2024 11:50:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48974) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxU1d-000215-CD for 70036@debbugs.gnu.org; Thu, 18 Apr 2024 11:50:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxU1K-0002WM-4g; Thu, 18 Apr 2024 11:49:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+iG++8JR90pwTuukiBDYtteyQtuSoEo77Q6v1ufh5Fg=; b=UF9at7gBZBiT2tfwdCKt b24ZMBK8u2saS2rwJ+kFINecfIdhdqx4ju3kmKVQfiQVXJ2lz8za9N8NK833VNc/Zi3nF7U3yVNG5 qX4dj4qzFuWdifa9OTi3i5TXsI2sNT1CVcHF46/tqEdT5v0EnTc6bXCaNSgE/GZbYXrq4SzBL4Flf HO6IexAv/wn1lrebpzR+lSQDMNicWaOqyVAlrqXILDvhWNALNP+Zdam9yjnnXPI4HcQUZ81kKOvIU cF2SUj47/3woqmQWEaEscfgPTVhx+9T2wKl6YQb53iHw+4VJlDMlHsDPW/QMgSrOZPiOlbnEfUbHP dEyZpBAe9yqzGw==; In-Reply-To: (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Thu, 18 Apr 2024 16:32:33 +0100) 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:283577 Archived-At: > From: João Távora > Date: Thu, 18 Apr 2024 16:32:33 +0100 > Cc: Eli Zaretskii , 70036@debbugs.gnu.org > > So I've read up on the bug report and I had a close look at the Eglot > usage profiles (not the micro-benchmarks, those are reasonably > irrelevant in what concerns Eglot). I see these kinds of things in > Theodor's profiles > > 18 8% - eglot--TextDocumentPositionParams > 18 8% - eglot--TextDocumentIdentifier > 18 8% - eglot--path-to-uri > 15 7% - file-truename > 14 6% - file-truename > 14 6% - file-truename > 11 5% - file-truename > 11 5% - file-truename > 11 5% - file-truename > 10 4% - file-truename > 10 4% - file-truename > 8 3% - file-truename > 8 3% - file-truename > 8 3% - file-truename > 5 2% - file-truename > 3 1% - file-truename > 2 0% - file-truename > 1 0% file-truename > > > I could reproduce this, but never even close to the amount of ~7-8%. > Best I could get was 1% and I had to work pretty hard for it. If I > invoke completion or something heavier like that, it completely > dominates the profile. > > 25 1% - eglot--TextDocumentPositionParams > 23 1% - eglot--TextDocumentIdentifier > 23 1% - eglot-path-to-uri > 13 0% - file-truename > 13 0% - file-truename > 13 0% - file-truename > 13 0% file-truename > > Maybe that's because file-truename is a recursive function that becomes > slower as the path it's asked to analyse becomes longer (obviously, > there can be a symlink at every junction). Profiles can mislead and they can lie. It is much easier to time the old and the new code doing the same jobs, and compare the times. > If so, I think this simpler patch after my sig is all we need, as it > completely clears the profile of any "file-truename". I have reverted > the earlier patch and pushed a patch very similar to the one after my sig. This new code should also be timed and compared to the other two versions, before we make the final decision on this.