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#55636: 27.2; etags performance fix when working with very big TAGS files Date: Thu, 26 May 2022 18:09:41 +0300 Message-ID: <83tu9cnxe2.fsf@gnu.org> References: <80qa6b58uq3.fsf@eurocontrol.int> <83r14hpm6s.fsf@gnu.org> <83k0a8q3ua.fsf@gnu.org> <9719dc6296ae4fafb5ccba1c0dab51ea@eurocontrol.int> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2646"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55636@debbugs.gnu.org, jurgen.de-backer.ext@eurocontrol.int, stef.van-vlierberghe@eurocontrol.int To: WAROQUIERS Philippe Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 26 17:10:13 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 1nuF7s-0000RA-GK for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 17:10:12 +0200 Original-Received: from localhost ([::1]:33148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuF7r-0006DD-4n for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 May 2022 11:10:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuF7i-0006D3-R6 for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 11:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37654) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nuF7i-0001cE-G4 for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 11:10:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nuF7i-0007QN-4y for bug-gnu-emacs@gnu.org; Thu, 26 May 2022 11:10: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, 26 May 2022 15:10:02 +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.165357779828524 (code B ref 55636); Thu, 26 May 2022 15:10:02 +0000 Original-Received: (at 55636) by debbugs.gnu.org; 26 May 2022 15:09:58 +0000 Original-Received: from localhost ([127.0.0.1]:59784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuF7e-0007Q0-KE for submit@debbugs.gnu.org; Thu, 26 May 2022 11:09:58 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55626) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuF7b-0007Pl-HA for 55636@debbugs.gnu.org; Thu, 26 May 2022 11:09:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:36810) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuF7V-0001bd-2K; Thu, 26 May 2022 11:09:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=SgDzeBa/TDtWZomI916sVQXuHoFwIZrZdOz/XEP/L/s=; b=UDzLD5VoDUFA sm7uMGdNQqGJvqUdokMYeipX6eyC48/nlJp63lVffbmb5c59GhJTX/FIHpJ8cxAUo0jkd8C+ZiP6a YgUCVtndy8ksw3+P5OZy0USlL/phyiU5VcVIs+TJi//WeU5kU9nmUOhAHelQusEaU1tNUJY/9Brut Se+42owTeEttEDLIo5/g6bcIPEH2i1d1F6g+nfO8j9J+vqDh7wuhNT73AduLPsiNmhfShAcH7Fsnp RWVd47wI7GtmsfPDOJZSuDLAkmLq678gUC5ZQeSb6cSNg01mi9sLg/JVUo8MGFnSfbfuTsc0Ubim3 2H/SjsZRS63K0nIPbWpjcw==; Original-Received: from [87.69.77.57] (port=4996 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuF7U-0001Wg-E5; Thu, 26 May 2022 11:09:48 -0400 In-Reply-To: (message from WAROQUIERS Philippe on Thu, 26 May 2022 14:54:04 +0000) 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:233116 Archived-At: > From: WAROQUIERS Philippe > CC: "DE BACKER Jurgen (EXT)" , > "55636@debbugs.gnu.org" <55636@debbugs.gnu.org>, VAN VLIERBERGHE Stef > > Date: Thu, 26 May 2022 14:54:04 +0000 > > So, I think the problem is just the size our 4 TAGS files: > > One is about 62 MB, 914_000 lines, of those lines, about 59_000 are file names lines, > another one 46 MB, 629_000 lines, also 59_000 file names lines. > > We have 2 other smaller TAGS file (8MB and 9MB). > > I have run emacs under valgrind --tool=callgrind. > > valgrind points at expand-file-name eating significant cpu (see attachment). I'm not sure I understand how to interpret that screenshot. > I have also used the lisp profiler when loading the TAGS files. > > > - call-interactively 10141 84% > - funcall-interactively 10077 84% > - find-tag 10069 83% > - find-tag-noselect 10069 83% > - visit-tags-table-buffer 9584 79% > - tags-table-including 9578 79% > - tags-table-extend-computed-list 4327 36% > - tags-verify-table 3274 27% > - apply 3274 27% > - ad-Advice-tags-verify-table 3274 27% This says that most of the time is spent in tags-table-including. If you manually load etags.el (NOT .elc!), and then profile the same operation, the profile could show in more detail which parts of tags-table-including takes most of the time, and we can take it from there. Thanks.