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: [PATCH] Speed up project-kill-buffers Date: Sat, 8 May 2021 20:10:31 +0300 Message-ID: <25bc7f1c-92e5-6b13-a6a4-d48b64b32ad3@yandex.ru> References: <87mttcgnke.fsf@posteo.net> <871raoezl0.fsf@posteo.net> <86r1ihig9p.fsf@stephe-leake.org> 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="8454"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: Philip Kaludercic , emacs-devel@gnu.org To: Stephen Leake , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 08 19:11:31 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 1lfQUF-00026Q-4z for ged-emacs-devel@m.gmane-mx.org; Sat, 08 May 2021 19:11:31 +0200 Original-Received: from localhost ([::1]:42632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lfQUE-0001SE-6p for ged-emacs-devel@m.gmane-mx.org; Sat, 08 May 2021 13:11:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lfQTO-0000m5-TY for emacs-devel@gnu.org; Sat, 08 May 2021 13:10:38 -0400 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:40762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lfQTN-0003CU-GB for emacs-devel@gnu.org; Sat, 08 May 2021 13:10:38 -0400 Original-Received: by mail-wm1-x335.google.com with SMTP id y124-20020a1c32820000b029010c93864955so8799758wmy.5 for ; Sat, 08 May 2021 10:10:35 -0700 (PDT) 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=NRU039kpLQ5xBKJGPsO/pZUcxwQrdzu1nPjcWi1oBVE=; b=JxZIvd5iTeDM7uonn2/QCpLeyoWHA0dm2+h6+LGdLj6bXVnlwnMbel/YxFRYMB2I9+ whYABc+cesBQJTadDleBwdtvXSgqWVTuYh9rE5wSJW7J/dmrGFo88SgmCtpyuOBwRzRg R5CE+h16mtKuisCGSvccSJRdOdewLVSEKPjhUPOPMge/Hneza0IMwZpn1IgA7xACJgqf 6dAHdMZgQgTCf1Mq33LOUSoEcCoxd0MKU9IlYrxhtcssTaoJgTdbfWNO4rLsjngr3prc KwU0M8wR9hm4PdtycNg+WB1T77IUcgU8NGuotJipXSEadlWi/EnpRum5qeshEYP9B1cO 1nXw== 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=NRU039kpLQ5xBKJGPsO/pZUcxwQrdzu1nPjcWi1oBVE=; b=tFf5GV25tFskjhg9IjxAXGRJh53Gb+WmXZiTwNNmST1hSBOg6YD/e7aC+///qBrH/4 MuLvmz16R8bwEWNotrtDCrxmm6qx3uLJCzoHJnmtR8KkS0jmLZ3Whx5KuVYV1GNUCdCg 6ujh6gYnqp2a40LYB2cIBD5T2je7UtOCCU95br2JbiNOV6cxQt8ojKDUGsofDp6y+49J ojT0Qi9giGpFauPBdIm6PFRKrDM4h38/u6YlN7bgaBQRkB6xctHWiQkmZRgs2oJaM9DF Tl+2GLDuvg+hKzLiWL8RYgUWCyOozLOma1wbiQ/c5tqvKbvnTPPVzBmzzQeMTVsIpBP9 lF3g== X-Gm-Message-State: AOAM530fChJdNUXWFYLNuoDrQHnhJbF9/gvxiCRlGzNy+7UlI6l4TV4U qySz83Bk4AD1xHwUrLnM5xGAP/RDlcQ= X-Google-Smtp-Source: ABdhPJyANFYjBzm9ih0+M3NNk4+rt+J2LwT/cNf6dX0GjVbs13RNih8EUVSM7LPANzkbeai1AwbbXA== X-Received: by 2002:a1c:4302:: with SMTP id q2mr27962333wma.1.1620493834283; Sat, 08 May 2021 10:10:34 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id r36sm20124003wmp.18.2021.05.08.10.10.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 08 May 2021 10:10:33 -0700 (PDT) In-Reply-To: <86r1ihig9p.fsf@stephe-leake.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=raaahh@gmail.com; helo=mail-wm1-x335.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.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NICE_REPLY_A=-0.001, 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:269060 Archived-At: Hi Stephen, On 08.05.2021 15:03, Stephen Leake wrote: > There are also projects that do not have a single root; an Emacs elisp > project (which has load-path as roots), any project with dependent > external libraries. This is not really than different. The VC backend has load-path in external roots (which can have counterparts in "dependency libraries" in other languages). When we close such project, though, we usually don't want to kill any of the buffers belonging to external libraries (they might as well be part of some other project, e.g. one that the current depends on). To support arbitrarily-shaped projects, though, we can introduce a method like 'project-contains-buffer?'. Which you would implement with 'member'. The performance could be okay if your projects are small enough. It doesn't handle non-file-visiting buffers, though.