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.devel Subject: Re: [ELPA] New package: dired-duplicates Date: Thu, 09 Nov 2023 10:43:32 +0200 Message-ID: <831qcz1fm3.fsf@gnu.org> References: <875y2nugm8.fsf@posteo.net> <83edha9mlg.fsf@gnu.org> <87h6m5shpf.fsf@gmail.com> <831qd9a7gg.fsf@gnu.org> <87lebhz78r.fsf@posteo.net> <83sf5p8efg.fsf@gnu.org> <2b30b6e0-d30e-41e1-83a5-05b0c3fa8aa6@gmx.at> <83lebg8zsu.fsf@gnu.org> <715392ae-8ae8-449e-905b-8ff2aa6a2e5a@gmx.at> <837cmr1nja.fsf@gnu.org> <48fece87-5bd9-4d37-a6bb-2e9b9da00bc2@gmx.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5982"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Harald Judt Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 09 09:44:26 2023 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 1r10eI-0001LA-Or for ged-emacs-devel@m.gmane-mx.org; Thu, 09 Nov 2023 09:44:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r10db-0001Cg-59; Thu, 09 Nov 2023 03:43:43 -0500 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 1r10dZ-00013x-G0 for emacs-devel@gnu.org; Thu, 09 Nov 2023 03:43:41 -0500 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 1r10dY-000457-Np; Thu, 09 Nov 2023 03:43:40 -0500 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=hXmaB2FmANVMn/3WRObQxK4ruhHIFCmh9dGBodgSu4o=; b=UwBL4RVgY+K+ IM6S2S2kz+GEO/hhmm1fBlaWe/pBPDFrit+RQ/xKbih6n+cnzRD6+stJ83PioIZMg5TTH+Z0nHmlj HWoJe0+CJUe7RSav/y2t3NgBKd411OCZNfgcTq7aYml0aSX309gXxBCrRtxYq+EpjVxjloMqoAllL L4FaWmwDLvAU9dmA/6Wtv+5mQn4V6r4nWSjHb+BT0rlZB2gfoaMeDuUJGPI9Y2qlumocaTc1RS/IH iDuEpMbqwJoJI/GmGvNmHeFAcSE8o7laAFfmZUxWk97z7/jwc/qBWW/4wZz8Y2p6Jnc0Nh/DFB0q2 EqJ97avz4LM4QLcnmAVHmA==; In-Reply-To: <48fece87-5bd9-4d37-a6bb-2e9b9da00bc2@gmx.at> (message from Harald Judt on Thu, 9 Nov 2023 09:00:11 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312387 Archived-At: > Date: Thu, 9 Nov 2023 09:00:11 +0100 > Cc: emacs-devel@gnu.org > From: Harald Judt > > > The size limitation should have its default value dependent on whether > > the build is a 32-bit (which we still support) or 64-bit. You can > > look at how we compute treesit-max-buffer-size, to figure out how to > > express the conditions for the default value. > > Yes, but I wonder, why do this? There can be 32-bit systems as well as 64-bit > systems that can have only 2GiB RAM, both might fail when trying to open a > file that has e.g. 1536MiB. Then, there might be both types of systems that > have 8gb of RAM that can open such files with no problems? If you are saying that we can do with a single value, I'm okay with that, provided that this value will be accepted by users. 32-bit systems cannot have buffers larger than 2 GiB, and a reasonable limit would be something like 500 MiB, I think. This could be too low for users of 64-bit systems, but if it's okay, it's fine with me. Your proposed default, 1 GiB, is too large for a typical 32-bit system, IMO. > Maybe it would be possible to make it dependent on the amount of RAM available > on the system? Ideally, yes, but in practice knowing how much is available is not that easy on a modern OS, so I don't think it's worth the hassle, especially in fallback code.