From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Automatic (e)tags generation and incremental updates Date: Mon, 11 Jan 2021 01:36:35 +0200 Message-ID: References: <779a6328-9ca5-202a-25a2-b270c66fe6dd@yandex.ru> <8fc5e96c-ebb8-c668-9b2a-c7c4ee54c0b9@yandex.ru> <83r1mwltob.fsf@gnu.org> <0bee9ab4-46bc-b6fd-97b6-e26cc80f1610@yandex.ru> <875z45dbm7.fsf@tromey.com> <1e9c9572-52ee-339b-78a2-731b9eb5f3de@yandex.ru> <871resd93f.fsf@tromey.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29308"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: Eli Zaretskii , john@yates-sheets.org, philipk@posteo.net, emacs-devel@gnu.org To: Tom Tromey Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 11 00:37:38 2021 Return-path: Envelope-to: ged-emacs-devel@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 1kykHC-0007X0-7E for ged-emacs-devel@m.gmane-mx.org; Mon, 11 Jan 2021 00:37:38 +0100 Original-Received: from localhost ([::1]:59842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kykHB-000313-8e for ged-emacs-devel@m.gmane-mx.org; Sun, 10 Jan 2021 18:37:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kykGO-0002Ye-N5 for emacs-devel@gnu.org; Sun, 10 Jan 2021 18:36:48 -0500 Original-Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:40536) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kykGK-0008HE-3F; Sun, 10 Jan 2021 18:36:48 -0500 Original-Received: by mail-wm1-x32f.google.com with SMTP id r4so13419351wmh.5; Sun, 10 Jan 2021 15:36:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=FM/DmsF5uyNx0IKm9XXm+7w8UUMq62g/09QbCn7K9p4=; b=QIANaUdss/gSlgsgjaAK1IQ2d5+0GJttDUAI+gL+LjBbil66SynLhB83pous+gAMUi LEZUsTqXbfJSHVGvLRzyp8reJntUeYdyYYpXR4c2OTk658uGqO63DjVRLkyK4SKsvXfT RqoXQ7U6Pp30kdbBn47rvK18vGFd4Ajx72DN9sj7l8Z7vNTaeqNv/rTNAcfJ/nywjJZF /+sPG69n4shq5+f8sxHvNpSXrUMAph5kSVb1suy4WPuoSqzSYI5oJVbtZYj/X8O0GVwk KcQwnhdVZnu3a2tXqfrada4zNuPb0LL1VgD5tqnpzGv6Asshq1q2Leqeky0TdCe0Pby4 XHtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=FM/DmsF5uyNx0IKm9XXm+7w8UUMq62g/09QbCn7K9p4=; b=eK9GWGqptpUyCbyHv3uKTPVeilbD7F4WVrHYvqqULmv8++IPNEQ/bJJ9pYV+6SqA8O vfKxK1UC2p3iNc2eRr0wPS0f4pqznKbjZbtRjZxBRHwwR8qkZ5J6VcxVDXJSCAGq/ciu p7Yzqs22qzz52v3oyATWGDA/T++PSP9ldY22nFYAe8Zc0hcuV2+skNzDX41b0hlyRnRW TS86EFMMIbJI4eegITpZnHHZcIa6RfTED7z5dE8C6CxAUojy7EnhZwnKPi9A8XGFWlct S4GuX8QyNCbb/Wj7mnR/k584tdvLdndbmfL0IDAbJ2q0T0dJYuKNrGQN77yIdzQx5j8+ Qk2A== X-Gm-Message-State: AOAM533j3rOQi85ZRRlEKFwM9Dzj9Bji/k76NiSNzKXkSPIByFVemyOL oQYi7lHP6vyZbA/85u91FOc= X-Google-Smtp-Source: ABdhPJzRg0UJhvuyb0deEWRnK3PKl/033QE2bd6Y1JqXt1gjIdc4DyLZsRwYhEsxwREM1bIMFUCGRQ== X-Received: by 2002:a7b:c385:: with SMTP id s5mr12269763wmj.170.1610321802319; Sun, 10 Jan 2021 15:36:42 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id g191sm21559357wmg.39.2021.01.10.15.36.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 10 Jan 2021 15:36:41 -0800 (PST) In-Reply-To: <871resd93f.fsf@tromey.com> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=raaahh@gmail.com; helo=mail-wm1-x32f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.012, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262889 Archived-At: On 10.01.2021 18:56, Tom Tromey wrote: > Dmitry> - Do we want to store the generated files openly in the root > Dmitry> directories of each project? > > Yeah. Either way is fine by me, since the projects I work on already > have TAGS in their .gitignore. One big advantage of this project for me personally would be having users that never got into etags at all (considering it too complicated, for one reason or other), having navigation work automatically OOtB, in multiple languages. Or with a minor mode enabled, at least. > Dmitry> Storing them with "garbled" names somewhere in /tmp of XDG cache > Dmitry> risks having to fully renenerate the indexes at least every time > Dmitry> the machine reboots. > > Does anyone really configure their system this way? XDG warns about > relying on the cache, but in practice I think that is a warning for > developers -- the model being that the user should be able to delete the > cache at any time. At least on the systems I've used, the cache is > persistent in practice. I have no idea, actually. Just figured that something like "cache" should be emptied out periodically. If it usually lives on, we could do away with having a {project -> tags file} alist in memory, serializing it on disk when Emacs is killed. > Dmitry> If general, doing updates when Emacs is idle and/or asynchronously are > Dmitry> quality-of-life changes that can come later after we improve > Dmitry> correctness (i.e. make sure the index is up to date even after > Dmitry> external changes). > > Please try it on a non-trivial project before committing to something. > IME a lot of these things work fine for simple projects, but when I want > to use them on gdb or gcc, they are unusably slow. I have several projects of moderate size (Emacs itself and some work ones, approximately similar) and I regularly try it on a checkout of the Mozilla codebase (which is close to 200K files). It seems to work all right on the former, and less well on the latter (initial generation takes 10+ seconds; I did optimize subsequent updates for it, but even searching for a single file name in a big enough tags file can take half a second). I have some projects in the middle (e.g. Ruby is 20K files), but I don't know which sizes are prevalent among our users, or even among folks here. So I'm looking for feedback.