From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.bugs Subject: bug#51523: 29.0.50; gnus-mime-view-part-externally very slow Date: Mon, 01 Nov 2021 15:20:38 +0000 Message-ID: <6abcac838b521de77925@heytings.org> References: <87v91dmcyz.fsf@gnus.org> <7b7f5641fcf9629c6074@heytings.org> <875ytcwxp7.fsf@gnus.org> <6abcac838b0dd46d94cf@heytings.org> <87sfwgvi73.fsf@gnus.org> <6abcac838bc0f53a0f78@heytings.org> <6abcac838bb83b0904d7@heytings.org> <6abcac838b7f89ee4e21@heytings.org> <831r3zncow.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5928"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51523@debbugs.gnu.org, larsi@gnus.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 01 16:21:22 2021 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 1mhZ7i-0001K8-5m for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Nov 2021 16:21:22 +0100 Original-Received: from localhost ([::1]:56866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhZ7h-0002i6-7F for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Nov 2021 11:21:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhZ7O-0002gT-V3 for bug-gnu-emacs@gnu.org; Mon, 01 Nov 2021 11:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhZ7O-0007Vy-MI for bug-gnu-emacs@gnu.org; Mon, 01 Nov 2021 11:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mhZ7O-0005f0-IJ for bug-gnu-emacs@gnu.org; Mon, 01 Nov 2021 11:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Nov 2021 15:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51523 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 51523-submit@debbugs.gnu.org id=B51523.163578004321712 (code B ref 51523); Mon, 01 Nov 2021 15:21:02 +0000 Original-Received: (at 51523) by debbugs.gnu.org; 1 Nov 2021 15:20:43 +0000 Original-Received: from localhost ([127.0.0.1]:35879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhZ75-0005e8-GF for submit@debbugs.gnu.org; Mon, 01 Nov 2021 11:20:43 -0400 Original-Received: from heytings.org ([95.142.160.155]:44646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhZ72-0005dt-QN for 51523@debbugs.gnu.org; Mon, 01 Nov 2021 11:20:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1635780039; bh=RbP1XrEnGUXoiYnHO0/o2uEqXMbSo0EwjZESUd9/YwY=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=OqYAeacZyYPnX/llGUGw+fGM+zR/gGIZWUOXBqNyj1O0YVhFe7GphlOk7TZiZTCxr qfGpT2O9OAGtTX3IehBikSCAs4Fs2xor8iYW9f9WzFPpQ1bP9oiWK2lK3nZheghd/Q 5xUzJ+o+RcbmVOqeZXvO7j43N/pvKekVIGEVxca6zOqtBrvpt0yPJf0jRC/oW95k5t PTvXwAbzinDtJB49y/mtG5iDf9w3o+FxzfQwlO5mlvklrnXUYmnDVKLaZByAzywXF1 QjHu3Q4XwHGj+POZzx6B4UKfh7mqSD9nbh/+b1PBkI48QW0OkUuaidkxV+iFyQolIL kfwpWasM+YPhw== In-Reply-To: <831r3zncow.fsf@gnu.org> 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:218767 Archived-At: > > . it uses the literal file name without even expanding it to an absolute file name, so the same FILE might mean different files if default-directory changes > . file names are generally not reliable enough for unique identifiers of files (think symlinks on all systems, letter-case and numerical tails on Windows, etc.), so we should at least use file-truename > . interning the file names could produce many unnecessary symbols in the global obarray > > Can we make the implementation more robust by fixing these? > Sure, I'll do that. Am I right that the first two points are fixed by using file-truename, and that the third one would be fixed by using (intern ... nil)? > > The name of the function also doesn't reflect what it does: it only > looks at the file's last modification time, so maybe at least "time" > should be in the name? > Perhaps we could also check the file size? This is IIRC what rsync does for example (by default), it considers that a file has changed if its modification time or size has changed. > > I also question the decision of testing modification time for equality: > why not check if the time stamp is newer, and disregard the changes to > an older time stamp? > This wouldn't be right I think, because the user might replace a file with another one with an older modification time. In which case the file has changed, too. > > When looking this way at this function, I ask myself whether extending > file-newer-than-file-p to do this job would be a better idea? > You mean, using file-newer-than-file-p with two identical arguments? That would always return nil, I guess. > > Or maybe I don't understand the general use case for this function. > The use case is the one of this bug: check whether a file has changed since the last invocation of file-has-changed-p. It's used to solve this bug: mailcap-parse-mailcaps parses the mailcap files again only when at least one of them has changed. Without this, when mailcap-parse-mailcaps is called in a loop, the mailcap files are parsed again and again, which is slow and unnecessary.