From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: WAROQUIERS Philippe via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#55636: 27.2; etags performance fix when working with very big TAGS files Date: Thu, 26 May 2022 20:45:08 +0000 Message-ID: References: <80qa6b58uq3.fsf@eurocontrol.int> <83r14hpm6s.fsf@gnu.org> <83k0a8q3ua.fsf@gnu.org> <9719dc6296ae4fafb5ccba1c0dab51ea@eurocontrol.int> <83tu9cnxe2.fsf@gnu.org> <5b7d2e64517641c581a9ed67857694c6@eurocontrol.int> <83leuonm8m.fsf@gnu.org> Reply-To: WAROQUIERS Philippe Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33415"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "55636@debbugs.gnu.org" <55636@debbugs.gnu.org>, "DE BACKER Jurgen \(EXT\)" , VAN VLIERBERGHE Stef To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 26 22:46:12 2022 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 1nuKN1-0008UV-Bv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 22:46:11 +0200 Original-Received: from localhost ([::1]:37542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuKN0-0002is-4e for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 16:46:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuKMs-0002ii-BI for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 16:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuKMr-0000Xm-W7 for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 16:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuKMr-0005b3-UI for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 16:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: WAROQUIERS Philippe Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 May 2022 20:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55636 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 55636-submit@debbugs.gnu.org id=B55636.165359792121454 (code B ref 55636); Thu, 26 May 2022 20:46:01 +0000 Original-Received: (at 55636) by debbugs.gnu.org; 26 May 2022 20:45:21 +0000 Original-Received: from localhost ([127.0.0.1]:60123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuKMD-0005Zy-A5 for submit@debbugs.gnu.org; Thu, 26 May 2022 16:45:21 -0400 Original-Received: from esa1.eurocontrol.c3s2.iphmx.com ([68.232.133.181]:13265) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuKMA-0005Zi-9S for 55636@debbugs.gnu.org; Thu, 26 May 2022 16:45:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eurocontrol.int; s=ectl2; t=1653597918; x=1654202718; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=Z6B/DsjRNZ2Cs4VmD0lrTNM3cJ6910HeMm61tXqdU+c=; b=UU6JvyIZcWBSKIEVoixSKqvyJ6kQOkZRw1R6LMPlLSEGG4HJbyhqla1K gR06HPGdj4jeRb2zJhespsR+SCJG9RUMxKpAFTe6sultDvq5fhB0UXZfR f2r8dxDkvFD6nwfgll3v3vgb/0/7qISjeRKMc5xkm65B3DxK3AetsRyfv bzoOYqIgzv3wZlRvTM+ngPte0he1TAWTtYVVkJ+uUfaodmoHw642iiGrV TbZKCvD7OHBMQaps9ipOmfO7dc0l8LpS9jA8C3ykJu8anujdPlzcqc0Mq jhDPQ/Q8S6lrh2vh82TOT2yvbC26KOWvy+PzMzrAKsanu5z9Ar9lYOw/9 w==; X-SignedOrEncrypted: False Original-Received: from unknown (HELO drsmtpl01.eurocontrol.int) ([153.98.68.246]) by esa1.eurocontrol.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2022 22:45:12 +0200 Original-Received: from SSPEX113.sky.corp.eurocontrol.int (sspex113.sky.corp.eurocontrol.int [172.19.3.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailservices.eurocontrol.int", Issuer "EUROCONTROL Certificate Authority 2016" (not verified)) by drsmtpl01.eurocontrol.int (Postfix) with ESMTPS id 0B51B24008A; Thu, 26 May 2022 22:45:09 +0200 (CEST) Original-Received: from SSPEX112.sky.corp.eurocontrol.int (172.19.3.3) by SSPEX113.sky.corp.eurocontrol.int (172.19.3.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Thu, 26 May 2022 22:45:08 +0200 Original-Received: from SSPEX112.sky.corp.eurocontrol.int ([fe80::841c:58fd:5e16:13b3]) by SSPEX112.sky.corp.eurocontrol.int ([fe80::841c:58fd:5e16:13b3%9]) with mapi id 15.01.2375.028; Thu, 26 May 2022 22:45:08 +0200 Thread-Topic: bug#55636: 27.2; etags performance fix when working with very big TAGS files Thread-Index: AQHYcFEPzgigVMgGzkm5D085LKSq8a0v1dh0gAAX1QCAAK7NlIAAcH4AgAArHjCAAAynl4AAGvRAgAAoZ6iAABR58A== In-Reply-To: <83leuonm8m.fsf@gnu.org> Accept-Language: en-US, en-BE Content-Language: en-US x-originating-ip: [172.19.15.150] 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" Xref: news.gmane.io gmane.emacs.bugs:233131 Archived-At: > > So, what we can observe there is that the C function Fexpand_file_name = makes 236_905 calls > > > > to Ffind_File_name_handler > > > > This Ffind_file_name_handler function makes 1.2 million calls to fast_s= tring_match. > > > > > > > > On this screenshot, we cannot see the CPU directly consumed by the func= tions, > > > > but looking at the direct cpu shows that expand-file-name cost is most= ly due to the fast_string_match closure > > The Lisp profile tells quite a different story: according to that, > expand-file-name is not a hotspot. > > So I still don't see that expand-file-name is the place to optimize > your use case. > > Did you succeed in reproducing the 10-sec delay with the original > code, and then ten-fold speedup if expand-file-name is called only on > non-absolute file names? I have tried to reproduce the 10 seconds delay to no success. With or without the expand-file-name called only on non absolute file names= , I now see emacs always using about 4 seconds of cpu to load the TAGS files= . So, at this point: * I do not understand why we observed 3 different speed: sub-second, 4 seconds and 10 seconds * we now see that loading the TAGS files takes around 4 seconds, so is s= till a heavy operation that maybe could be optimised but not clear anymore what is= the costly part. Thanks Philippe ____ This message and any files transmitted with it are legally privileged and i= ntended for the sole use of the individual(s) or entity to whom they are ad= dressed. If you are not the intended recipient, please notify the sender by= reply and delete the message and any attachments from your system. Any una= uthorised use or disclosure of the content of this message is strictly proh= ibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment= on the part of EUROCONTROL, unless it is confirmed by appropriately signed= hard copy. Any views expressed in this message are those of the sender.