bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51523: 29.0.50; gnus-mime-view-part-externally very slow


From: Gregory Heytings
Subject: bug#51523: 29.0.50; gnus-mime-view-part-externally very slow
Date: Mon, 01 Nov 2021 00:11:32 +0000


* lisp/net/mailcap.el (mailcap-mime-info): Remove force argument to mailcap-parse-mailcaps. Fixes bug#51523.

The mailcaps are being parsed on each invocation on purpose to catch edits.

The problem here is that it takes a long time to parse the file(s) -- it should be pretty much instantaneous.


Hmm... On my computer, Stefan's recipe (benchmark-run 1 (mapcar #'mailcap-mime-info (mailcap-mime-types))) takes 0.5 s without the force argument, and 25 s with it.

FWIW, on my computer (Debian bookworm):

(length (mailcap-mime-types)) => 1478
(benchmark-run 1 (mailcap-mime-info "application/octet-stream")) => 
(0.073829567 1 0.02996454400000001)
(benchmark-run 1 (find-auto-coding "/etc/mailcap" 4096)) => 
(0.00030021999999999997 0 0.0)
(benchmark-run 1 (mapcar #'mailcap-mime-info (mailcap-mime-types))) => 
(25.234923454 1674 12.865286990000001)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]