From unknown Sat Aug 16 18:16:28 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#71576 <71576@debbugs.gnu.org> To: bug#71576 <71576@debbugs.gnu.org> Subject: Status: 30.0.50; [PATCH] Improve performance of Comint/Eshell password prompt handling Reply-To: bug#71576 <71576@debbugs.gnu.org> Date: Sun, 17 Aug 2025 01:16:28 +0000 retitle 71576 30.0.50; [PATCH] Improve performance of Comint/Eshell passwor= d prompt handling reassign 71576 emacs submitter 71576 Jim Porter severity 71576 normal tag 71576 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 15 15:59:58 2024 Received: (at submit) by debbugs.gnu.org; 15 Jun 2024 19:59:58 +0000 Received: from localhost ([127.0.0.1]:45588 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIZZ7-0005XC-AU for submit@debbugs.gnu.org; Sat, 15 Jun 2024 15:59:58 -0400 Received: from lists.gnu.org ([209.51.188.17]:54510) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIZZ4-0005WR-Ks for submit@debbugs.gnu.org; Sat, 15 Jun 2024 15:59:55 -0400 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 1sIZPY-0002rJ-Iv for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2024 15:50:04 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sIZPW-0008JZ-DN for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2024 15:50:04 -0400 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-6e5fd488d9fso2453976a12.3 for ; Sat, 15 Jun 2024 12:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718481001; x=1719085801; darn=gnu.org; h=subject:from:to:content-language:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=dWIFUXMQcpYDEJgzYo52Ov67Qn6Fx2VsAzA4fBy7GMI=; b=ePhuClNLii88/MrOZdFteA0/fvd8JaRpX7fzFS5w3aZc8ZTL0diGKZ9achwkkN4vXn Ofmxm7n20qIB5UC/YCYlrGeacidLft6mnWXabh4oNqRCK2kFAy3C6dkuwVtirWx9NpY0 jAw9dwNOzoIMHO2DHwZpoc2mHEWesusaniMwtu0VUeRdLC4xFnZ52RbUtz37T0NEZlvM 3pCF0aIj3x1yInsFGY3bLsm/tVCCOQWIA3fvwhObl1wq5UhQs5jJTXb1F/vGVVlhVEYX vMn3DKOt4iADn3UDbJ23+bkPdhykxSvUUxB/TpLBJiNzPMjtiS253RpoCvfECxA4kaMz iN1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718481001; x=1719085801; h=subject:from:to:content-language:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dWIFUXMQcpYDEJgzYo52Ov67Qn6Fx2VsAzA4fBy7GMI=; b=VTFbOZXuPqK/bu/9Uejiaxw+AD6y/sgujDlHXIfvCeL0ZAKJ4ckhwTmwg0j3/Ej36R SvMf4jjkHyF6OGFERDO0nKWERynfOpOAA7pTxyDE3zUBbH57Y8JrqHmmzB59+XEYps5N XkDJAvqqYzR1J46z/xJemirNLOs/o5B/gZzDEiB3Js4QiUOsh/meCM5vtKvjjXFr0fsf tRaWmIyuaXIBW+qIKE5GMUGbsPNWGs3sPBuaI+S3bap9cEW6T/3oD/mDdgZuxtndNOBz 7WTmI8BGW2VVnwymVPZMYKtnznka67+ilUvh2J0iPStwfpHpqjAdViIjw1uOfUTK2QXe rz9g== X-Gm-Message-State: AOJu0Yw3oirtdALu0Kqz0RWlR/W7dPyyk5A/rcy/P5fhjEjQVxuKzxg7 d0tad4dZAeDmiXopwZXmjcBnk96knXTnSRCt5K6rw1EcqDevH+KoKeJqUg== X-Google-Smtp-Source: AGHT+IHwNKl//W18fAjiO22ZjmHUoU9QOm9xvJRWPBb99mhjJmSUlIhWxppnUyoBBSlGkvF8bbIp2w== X-Received: by 2002:a17:902:d3c5:b0:1f7:b24:3e8d with SMTP id d9443c01a7336-1f8627cc396mr61558245ad.38.1718481000686; Sat, 15 Jun 2024 12:50:00 -0700 (PDT) Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-1f855ee8354sm53338425ad.149.2024.06.15.12.49.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Jun 2024 12:50:00 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------RO9GwwTGaLuRfEcC7HfCkltz" Message-ID: Date: Sat, 15 Jun 2024 12:50:01 -0700 MIME-Version: 1.0 X-Mozilla-News-Host: news://news.gmane.io:119 Content-Language: en-US To: bug-gnu-emacs@gnu.org From: Jim Porter Subject: 30.0.50; [PATCH] Improve performance of Comint/Eshell password prompt handling Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=jporterbugs@gmail.com; helo=mail-pg1-x533.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) This is a multi-part message in MIME format. --------------RO9GwwTGaLuRfEcC7HfCkltz Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit How long can a password prompt really be? In Comint and Eshell, we check for output from subprocesses that looks like a password prompt, so that we can hide the password when the user types it in. That's good, but for commands that output a lot of text, it can take a while to scan through it all. The attached patch adds a performance optimization for this: since we only check for password prompts at the end of a block of output (the subprocess is presumably waiting for the user to type in their password), we only need to look at the last N characters, where N is whatever the maximum password prompt length is. There's obviously no *strict* maximum here, but I can't imagine a password prompt being longer than 256 characters. Compared to the default 'read-process-output-max' value of 4096, this means we could skip up to 93% of the output when looking for the prompt. In practice, this optimization makes us about 25% faster at outputting large amounts of text. For example, in shell-mode, "cat config.log" gives me the following results: BEFORE | AFTER --------+------- 3.852 | 2.890 3.728 | 2.771 3.568 | 2.716 The results in Eshell are pretty similar, too. I've added NEWS entries for this, although maybe this isn't something that really needs to be announced. Still, I figured it was worth mentioning in the unlikely case that the new behavior could cause some problem with (very!) long password prompts. I'm also totally fine with letting this patch wait for Emacs 31 if there's any concern about the code. It's not a big change, but maybe it's worth erring on the side of stability. --------------RO9GwwTGaLuRfEcC7HfCkltz Content-Type: text/plain; charset=UTF-8; name="0001-Limit-the-amount-of-text-we-examine-when-looking-for.patch" Content-Disposition: attachment; filename*0="0001-Limit-the-amount-of-text-we-examine-when-looking-for.pa"; filename*1="tch" Content-Transfer-Encoding: base64 RnJvbSAxOTdlYzYzNjhlNmQyNjc4ZjhmMTYwMWRjMWE5ODAwODU1ZGYwOTQzIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBKaW0gUG9ydGVyIDxqcG9ydGVyYnVnc0BnbWFpbC5j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W50IG1vZGUuCkBAIC0yNTYzLDIzICsyNTc1LDI2IEBAIGNvbWludC13YXRjaC1mb3It cGFzc3dvcmQtcHJvbXB0CiBjYXJyaWFnZSByZXR1cm5zIChcXHIpIGluIFNUUklORy4KIAog VGhpcyBmdW5jdGlvbiBjb3VsZCBiZSBpbiB0aGUgbGlzdCBgY29taW50LW91dHB1dC1maWx0 ZXItZnVuY3Rpb25zJy4iCi0gICh3aGVuIChsZXQgKChjYXNlLWZvbGQtc2VhcmNoIHQpKQot CSAgKHN0cmluZy1tYXRjaCBjb21pbnQtcGFzc3dvcmQtcHJvbXB0LXJlZ2V4cAotICAgICAg ICAgICAgICAgICAgICAgICAgKHN0cmluZy1yZXBsYWNlICJcciIgIiIgc3RyaW5nKSkpCi0g ICAgOzsgVXNlIGBydW4tYXQtdGltZScgaW4gb3JkZXIgbm90IHRvIHBhdXNlIGV4ZWN1dGlv biBvZiB0aGUKLSAgICA7OyBwcm9jZXNzIGZpbHRlciB3aXRoIGEgbWluaWJ1ZmZlcgotICAg IChydW4tYXQtdGltZQotICAgICAwIG5pbAotICAgICAobGFtYmRhIChjdXJyZW50LWJ1ZikK LSAgICAgICAod2l0aC1jdXJyZW50LWJ1ZmZlciBjdXJyZW50LWJ1ZgotICAgICAgICAgKGxl dCAoKGNvbWludC0tcHJvbXB0LXJlY3Vyc2lvbi1kZXB0aAotICAgICAgICAgICAgICAgICgx KyBjb21pbnQtLXByb21wdC1yZWN1cnNpb24tZGVwdGgpKSkKLSAgICAgICAgICAgKGlmICg+ IGNvbWludC0tcHJvbXB0LXJlY3Vyc2lvbi1kZXB0aCAxMCkKLSAgICAgICAgICAgICAgICht ZXNzYWdlICJQYXNzd29yZCBwcm9tcHQgcmVjdXJzaW9uIHRvbyBkZWVwIikKLSAgICAgICAg ICAgICAod2hlbiAoZ2V0LWJ1ZmZlci1wcm9jZXNzIChjdXJyZW50LWJ1ZmZlcikpCi0gICAg ICAgICAgICAgICAoY29taW50LXNlbmQtaW52aXNpYmxlCi0gICAgICAgICAgICAgICAgKHN0 cmluZy10cmltIHN0cmluZyAiWyBcblxyXHRcdlxmXGJcYV0rIiAiXG4rIikpKSkpKSkKLSAg ICAgKGN1cnJlbnQtYnVmZmVyKSkpKQorICAobGV0ICgoc3RyaW5nIChzdHJpbmctbGltaXQg c3RyaW5nIGNvbWludC1wYXNzd29yZC1wcm9tcHQtbWF4LWxlbmd0aCB0KSkKKyAgICAgICAg cHJvbXB0KQorICAgICh3aGVuIChsZXQgKChjYXNlLWZvbGQtc2VhcmNoIHQpKQorICAgICAg ICAgICAgKHN0cmluZy1tYXRjaCBjb21pbnQtcGFzc3dvcmQtcHJvbXB0LXJlZ2V4cAorICAg ICAgICAgICAgICAgICAgICAgICAgICAoc3RyaW5nLXJlcGxhY2UgIlxyIiAiIiBzdHJpbmcp KSkKKyAgICAgIChzZXRxIHByb21wdCAoc3RyaW5nLXRyaW0gKG1hdGNoLXN0cmluZyAwIHN0 cmluZykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlsgXG5cclx0XHZcZlxi XGFdKyIgIlxuKyIpKQorICAgICAgOzsgVXNlIGBydW4tYXQtdGltZScgaW4gb3JkZXIgbm90 IHRvIHBhdXNlIGV4ZWN1dGlvbiBvZiB0aGUKKyAgICAgIDs7IHByb2Nlc3MgZmlsdGVyIHdp dGggYSBtaW5pYnVmZmVyCisgICAgICAocnVuLWF0LXRpbWUKKyAgICAgICAwIG5pbAorICAg ICAgIChsYW1iZGEgKGN1cnJlbnQtYnVmKQorICAgICAgICAgKHdpdGgtY3VycmVudC1idWZm ZXIgY3VycmVudC1idWYKKyAgICAgICAgICAgKGxldCAoKGNvbWludC0tcHJvbXB0LXJlY3Vy c2lvbi1kZXB0aAorICAgICAgICAgICAgICAgICAgKDErIGNvbWludC0tcHJvbXB0LXJlY3Vy c2lvbi1kZXB0aCkpKQorICAgICAgICAgICAgIChpZiAoPiBjb21pbnQtLXByb21wdC1yZWN1 cnNpb24tZGVwdGggMT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gICAgKHJ1bi1hdC10aW1lCi0gICAgICAgICAgICAgMCBuaWwK LSAgICAgICAgICAgICAobGFtYmRhIChjdXJyZW50LWJ1ZikKLSAgICAgICAgICAgICAgICh3 aXRoLWN1cnJlbnQtYnVmZmVyIGN1cnJlbnQtYnVmCi0gICAgICAgICAgICAgICAgIChlc2hl bGwtc2VuZC1pbnZpc2libGUpKSkKLSAgICAgICAgICAgICAoY3VycmVudC1idWZmZXIpKSkp KSkpCisgICAgICAoZ290by1jaGFyIChpZiBlc2hlbGwtcGFzc3dvcmQtcHJvbXB0LW1heC1s ZW5ndGgKKyAgICAgICAgICAgICAgICAgICAgIChtYXggZXNoZWxsLWxhc3Qtb3V0cHV0LWJs b2NrLWJlZ2luCisgICAgICAgICAgICAgICAgICAgICAgICAgICgtIGVzaGVsbC1sYXN0LW91 dHB1dC1lbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNoZWxsLXBhc3N3b3Jk LXByb21wdC1tYXgtbGVuZ3RoKSkKKyAgICAgICAgICAgICAgICAgICBlc2hlbGwtbGFzdC1v dXRwdXQtYmxvY2stYmVnaW4pKQorICAgICAgKHdoZW4gKGxldCAoKGNhc2UtZm9sZC1zZWFy Y2ggdCkpCisgICAgICAgICAgICAgIChyZS1zZWFyY2gtZm9yd2FyZCBlc2hlbGwtcGFzc3dv cmQtcHJvbXB0LXJlZ2V4cAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNo ZWxsLWxhc3Qtb3V0cHV0LWVuZCB0KSkKKyAgICAgICAgOzsgVXNlIGBydW4tYXQtdGltZScg aW4gb3JkZXIgbm90IHRvIHBhdXNlIGV4ZWN1dGlvbiBvZiB0aGUKKyAgICAgICAgOzsgcHJv Y2VzcyBmaWx0ZXIgd2l0aCBhIG1pbmlidWZmZXIuCisgICAgICAgIChydW4tYXQtdGltZQor ICAgICAgICAgMCBuaWwKKyAgICAgICAgIChsYW1iZGEgKGN1cnJlbnQtYnVmKQorICAgICAg ICAgICAod2l0aC1jdXJyZW50LWJ1ZmZlciBjdXJyZW50LWJ1ZgorICAgICAgICAgICAgIChl c2hlbGwtc2VuZC1pbnZpc2libGUpKSkKKyAgICAgICAgIChjdXJyZW50LWJ1ZmZlcikpKSkp KQogCiAoY3VzdG9tLWFkZC1vcHRpb24gJ2VzaGVsbC1vdXRwdXQtZmlsdGVyLWZ1bmN0aW9u cwogCQkgICAnZXNoZWxsLXdhdGNoLWZvci1wYXNzd29yZC1wcm9tcHQpCi0tIAoyLjI1LjEK Cg== --------------RO9GwwTGaLuRfEcC7HfCkltz-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 16 03:50:24 2024 Received: (at 71576) by debbugs.gnu.org; 16 Jun 2024 07:50:24 +0000 Received: from localhost ([127.0.0.1]:34283 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIkee-0005t3-3L for submit@debbugs.gnu.org; Sun, 16 Jun 2024 03:50:24 -0400 Received: from mout.gmx.net ([212.227.15.19]:42661) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIkec-0005sl-8F for 71576@debbugs.gnu.org; Sun, 16 Jun 2024 03:50:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1718524213; x=1719129013; i=michael.albinus@gmx.de; bh=iWUw5wQzY8NQeXpeGtz9z16tbtINmdoMlgAJC6VQG4M=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=muQ/K0ampyP5AF/36zipKPl+eBqX2O99+DNMtdcHiMFBRVZbdwdDeTrRJyx4ljR1 Jtghd8WhcMuX1yoZZL7ijkDpOuHCr5ASkMdld1HKchJVbhbkfvVn2clM6EP64EFbM rSRMNEPoSBTLTrNBP7DIjWt6yxaqF93FED0jqFCtsKBxSjvV2sQV3pcszZNwKKYA4 Ib1CfTi9xex7WPJrTaTWAap5/KQ98Tcl1H3iDdifiyxy3nCVLDrJV/skgIdTDXBFH cNvrOUP6oJy0t7KVDcqCpV0hSutgc/iMeBHa9ARnbxEX26qXatEVGpiTpxYtuhE31 +hQpFsorkAfuecrOpw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N5VDE-1sT8tp1tD0-017Kan; Sun, 16 Jun 2024 09:45:11 +0200 From: Michael Albinus To: Jim Porter Subject: Re: bug#71576: 30.0.50; [PATCH] Improve performance of Comint/Eshell password prompt handling In-Reply-To: (Jim Porter's message of "Sat, 15 Jun 2024 12:50:01 -0700") References: Date: Sun, 16 Jun 2024 09:45:10 +0200 Message-ID: <87le35gwl5.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:LFL77v344h/z9vQBze2DTvj8I/b/5MgLnbGrxWuJ18wy2mcAxAd Qi1UhO7B2wlQH8/87mc9dnMyG9cQlgkpj9cchnU5Gk4kfhpXgZi0/Ho2oL41wzVMumAu0Xd QWhNTgEYdIpTsAoljPg6HcQ1Kf33SnsH55ZZs6X2BmOkQp9li74S6/T8q1lojkLh9rIhnUZ jBA8ngSIpsY6ZMT7gO5zQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:gY1bI13i/og=;HCDHCEPZXcqBOnLleX+mj9A+CG7 D4VKuMQez4soYAaMuChUiJOb/djVP5gEZi9F0MKb+7cjNp4wYcuKI+7MppwXJrrqO3TLeaJOS p3gJbfPeAR/uZkogLZCeMvpzHgUelVfiTfdtLoNIo3WDuW+xqJDxsc3s9fKOAL7nQOtgxTpju QblT7VnIqFpqNjJijJ9YF1i67Bn/xx9eaLTuVsShRubqvYIqlGggCSnIwRORWCmMIMDMYv2hq fbucMiElB8zHFB1OU8ZvFrZvs5gLjwScwEJQeypPEvy8+9zz5iQFFcecL7TJZz3rez7fP7Q3h mjy7bXcScLd/bZMWq2dtd6MEZqQ+MRkZkHLEJGrDkcTD07aJv5Vw+IhhDohq24pkcIAb21zqQ MJT3jAlEgHZrx1ZvGaFIwuUWCGEoc8ZiuelnYfBnTe2i5DSW14cozjK0Q/W8wG6z1EPUwJjaS 0w06bFmLCozpRpFDGRlkJtjwl3PYVRtRaYwRZ6IUWLsRHabY9/W5STjnsxrsbZlU0mPu3PRlr an6mHzC9E2rDmLBQo0e/lyfdpFSl4YaRwEXNYmp2P3AxfoRCSm3gEYMmndC+Qh86k9Ciy9m3P 0wp6xNE5iwEHHsmylPZ3le5uwJ0+QBTxdNN/8kCWdnklxrpe91QtjoNV7grE60GTnPrVf5eDX cdqVqT1xVltC5mNZg2STi8+cou95hR1PZyZ4dAnFbLkiwinmMi86hUVRdBzVg/UrBkRg8G16b MugGLg23MUfgy3tVleleRWwUKtbjm3wc3G5tjtQK72Bo05N8CSpIJ/m0dD/xN4YcUz6DCzlMx OfzOGU2CAEVjmEzl08vP1EyrkR/pBNAm/u1g3nppq62bU= X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Jim Porter writes: Hi Jim, > How long can a password prompt really be? In Comint and Eshell, we > check for output from subprocesses that looks like a password prompt, > so that we can hide the password when the user types it i [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [185.89.38.155 listed in zen.spamhaus.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.19 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.15.19 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 71576 Cc: 71576@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Jim Porter writes: Hi Jim, > How long can a password prompt really be? In Comint and Eshell, we > check for output from subprocesses that looks like a password prompt, > so that we can hide the password when the user types it i [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [185.89.38.155 listed in zen.spamhaus.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.19 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.15.19 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Jim Porter writes: Hi Jim, > How long can a password prompt really be? In Comint and Eshell, we > check for output from subprocesses that looks like a password prompt, > so that we can hide the password when the user types it in. That's > good, but for commands that output a lot of text, it can take a while > to scan through it all. > > The attached patch adds a performance optimization for this: since we > only check for password prompts at the end of a block of output (the > subprocess is presumably waiting for the user to type in their > password), we only need to look at the last N characters, where N is > whatever the maximum password prompt length is. There's obviously no > *strict* maximum here, but I can't imagine a password prompt being > longer than 256 characters. Compared to the default > 'read-process-output-max' value of 4096, this means we could skip up > to 93% of the output when looking for the prompt. FTR, Tramp scans output for a prompt from the end for years. It's not only a password prompt, but also a shell prompt it looks for. It restricts itself to 256 characters. --8<---------------cut here---------------start------------->8--- (defun tramp-search-regexp (regexp) "Search for REGEXP backwards, starting at point-max. If found, set point to the end of the occurrence found, and return point. Otherwise, return nil." (goto-char (point-max)) ;; We restrict ourselves to the last 256 characters. There were ;; reports of a shell command "git ls-files -zco --exclude-standard" ;; with 85k files involved, which has blocked Tramp forever. (search-backward-regexp regexp (max (point-min) (- (point) 256)) 'noerror)) --8<---------------cut here---------------end--------------->8--- Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 16 06:55:00 2024 Received: (at 71576) by debbugs.gnu.org; 16 Jun 2024 10:55:00 +0000 Received: from localhost ([127.0.0.1]:46113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sInXE-0005R4-BB for submit@debbugs.gnu.org; Sun, 16 Jun 2024 06:54:59 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:59837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sInXC-0005Qh-MK for 71576@debbugs.gnu.org; Sun, 16 Jun 2024 06:54:55 -0400 Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-579fa270e53so5252309a12.3 for <71576@debbugs.gnu.org>; Sun, 16 Jun 2024 03:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718535227; x=1719140027; darn=debbugs.gnu.org; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:from:to:cc:subject:date:message-id :reply-to; bh=Qvmo5Qvb0n62wqfLIxuqMWs1uhql93pvQ1cZYuHW/Eo=; b=X8/8Nxx7ZgC+Pw7Za3ai+aHcOFqvEyCzqPhxQGdMCpiYlULl5cSxByJzR1suT5a56Q ZIMrEWaRMdBQM6GH2AXPCF9nbtlwtkBHGENt1Qs4huOBv+0aA3pQbsUV0uamJky/d5O9 t4x6NaMV7/JAiUg+50nKjEiSLqTzbk86+9ccpNmepvEGKvyaeJz8FV8IUA0hZXAzmtkZ JHLxv8QiC9UxxufQQY1W9agCi69uKczqGXq1zibsNWAcL64QxdnNLQPIVMc3Y6iLwahd pGDaxTapUTa3ICBo4wJ3v82gQzg9lvg1WIyR5yUfAic6wO98cRZUMddaV56Nc3WlU3Um j7wQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718535227; x=1719140027; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=Qvmo5Qvb0n62wqfLIxuqMWs1uhql93pvQ1cZYuHW/Eo=; b=FQ91A6nAzzh2oecrF24EaKDVI3qxYWRQfQT/E6daRUnoxqmI+N7tuq89AklMqdcUOd RJ9zxMUflq4EC04xDns3Y/H2oCqpvHtPpzMpamKPqYnjZiqOcq8NfGVzLaTMA7yw3UC9 ASRatoXW86RL+5vOSCsNCwj5P82/cKvW+1sVXcqTP3XOwiMRSVtO2iWvAC/ty53Asdk1 o8iVEIMP/BtVEMZN4AZRrVQVQnd8aAgqTWMkJ1/X1P57GSc57jaKuqPuajjlJciivwPK mPVjBot0Xw1PujQf7KUG70UOdLSXCJGtzsXHNJJGOJd7IAlCFtSEvkdbYUoCtawjX1gN Qemg== X-Forwarded-Encrypted: i=1; AJvYcCWnJqrTEp9MI28oADP+jdh0EadrFMG0gobP6Dba0mQ6LDpAkx+ES8c0kZXivSUrgqyVhLRkMspLxdVWW5Qee24vWAbXfWc= X-Gm-Message-State: AOJu0Yz+xp0rFYqFP6Fcq4L6QHoP5xyx2CGom2RWlHbqEc/0XEHIHeBZ qRnPCR3ItMtDeYhgJuAzWjr7BsMaugfPMKXr4+mPyZwCraTk+WUYHIAyElPWVu9gBbx00HS0aF8 d+aotzYIXOsPJ8JWxkXGjMTqP5f0= X-Google-Smtp-Source: AGHT+IEynqKQt7uc3QUUvFco6oETUL84a0a5bsURekF02ZLqfuUkbKxBeVG9hPImq82SR33llsNzylflTWvvr1YsppA= X-Received: by 2002:a50:d6d3:0:b0:57c:6d9a:914e with SMTP id 4fb4d7f45d1cf-57cbd69e7abmr6175378a12.30.1718535227362; Sun, 16 Jun 2024 03:53:47 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sun, 16 Jun 2024 03:53:46 -0700 From: Stefan Kangas In-Reply-To: References: MIME-Version: 1.0 Date: Sun, 16 Jun 2024 03:53:46 -0700 Message-ID: Subject: Re: bug#71576: 30.0.50; [PATCH] Improve performance of Comint/Eshell password prompt handling To: Jim Porter , 71576@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71576 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jim Porter writes: > I've added NEWS entries for this, although maybe this isn't something > that really needs to be announced. Still, I figured it was worth > mentioning in the unlikely case that the new behavior could cause some > problem with (very!) long password prompts. > > I'm also totally fine with letting this patch wait for Emacs 31 if > there's any concern about the code. It's not a big change, but maybe > it's worth erring on the side of stability. Thanks. I'd be okay with putting this patch in Emacs 30, but let's see what other people think. > From 197ec6368e6d2678f8f1601dc1a9800855df0943 Mon Sep 17 00:00:00 2001 > From: Jim Porter > Date: Sat, 15 Jun 2024 11:03:33 -0700 > Subject: [PATCH] Limit the amount of text we examine when looking for pas= sword > prompts > > Both Comint and Eshell do this, and it can significantly slow down > commands that write a lot of output. > > * lisp/comint.el (comint-password-prompt-max-length): New option... > (comint-watch-for-password-prompt): ... use it. Additionally, use the > matched result for the Emacs-based password prompt. > > * lisp/eshell/esh-mode.el (eshell-password-prompt-max-length): New > option... > (eshell-watch-for-password-prompt): ... use it. > > * etc/NEWS: Announce this change. > --- > etc/NEWS | 21 +++++++++++++++--- > lisp/comint.el | 49 +++++++++++++++++++++++++++-------------- > lisp/eshell/esh-mode.el | 41 +++++++++++++++++++++++----------- > 3 files changed, 78 insertions(+), 33 deletions(-) > > diff --git a/etc/NEWS b/etc/NEWS > index b2fdbc4a88f..1cf5025910c 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -1002,9 +1002,16 @@ more information on this notation. > --- > *** Performance improvements for interactive output in Eshell. > Interactive output in Eshell should now be significantly faster, > -especially for built-in commands that can print large amounts of output > -(e.g. "cat"). In addition, these commands can now update the display > -periodically to show their progress. > +especially for commands that can print large amounts of output > +(e.g. "cat"). For external commands, Eshell saves time by only looking > +for password prompts in the last 256 characters of each block of output. > +To change the amount of text to examine, customize > +'eshell-password-prompt-max-length'. > + > +--- > +*** Eshell built-in commands can now display progress. > +Eshell built-in commands like "cat" and "ls" now update the display > +periodically while running to show their progress. > > +++ > *** New special reference type '#'. > @@ -1160,6 +1167,14 @@ environment variable 'HISTFILE'. > > In a 'shell' buffer, this user option is connection-local. > > +--- > +*** Performance improvements for interactive output. > +Interactive output in Shell mode now scans more selectively for password > +prompts by only examining the last 256 characters of each block of > +output, reducing the time spent when printing large amounts of output. > +To change the amount of text to examine, customize > +'comint-password-prompt-max-length'. > + > ** Make mode > > *** The Makefile browser is now obsolete. > diff --git a/lisp/comint.el b/lisp/comint.el > index 3804932e01c..b8a12074fb7 100644 > --- a/lisp/comint.el > +++ b/lisp/comint.el > @@ -426,6 +426,18 @@ comint-password-prompt-regexp > :type 'regexp > :group 'comint) > > +(defcustom comint-password-prompt-max-length 256 > + "The maximum amount of text to examine when matching password prompts. > +When non-nil, only examine the last N characters of a block of output. > +If nil, examine all the output. > + > +This is used by `comint-watch-for-password-prompt' to reduce the amount > +of time spent searching for password prompts." > + :version "30.1" > + :type '(choice natnum > + (const :tag "Examine all output" nil)) > + :group 'comint) If this is hardcoded in Tramp, are we sure that we need this as an option? I'd suggest making it into a defconst or defvar instead. > + > ;; Here are the per-interpreter hooks. > (defvar comint-get-old-input (function comint-get-old-input-default) > "Function that returns old text in Comint mode. > @@ -2563,23 +2575,26 @@ comint-watch-for-password-prompt > carriage returns (\\r) in STRING. > > This function could be in the list `comint-output-filter-functions'." > - (when (let ((case-fold-search t)) > - (string-match comint-password-prompt-regexp > - (string-replace "\r" "" string))) > - ;; Use `run-at-time' in order not to pause execution of the > - ;; process filter with a minibuffer > - (run-at-time > - 0 nil > - (lambda (current-buf) > - (with-current-buffer current-buf > - (let ((comint--prompt-recursion-depth > - (1+ comint--prompt-recursion-depth))) > - (if (> comint--prompt-recursion-depth 10) > - (message "Password prompt recursion too deep") > - (when (get-buffer-process (current-buffer)) > - (comint-send-invisible > - (string-trim string "[ \n\r\t\v\f\b\a]+" "\n+"))))))) > - (current-buffer)))) > + (let ((string (string-limit string comint-password-prompt-max-length t= )) > + prompt) > + (when (let ((case-fold-search t)) > + (string-match comint-password-prompt-regexp > + (string-replace "\r" "" string))) > + (setq prompt (string-trim (match-string 0 string) > + "[ \n\r\t\v\f\b\a]+" "\n+")) > + ;; Use `run-at-time' in order not to pause execution of the > + ;; process filter with a minibuffer > + (run-at-time > + 0 nil > + (lambda (current-buf) > + (with-current-buffer current-buf > + (let ((comint--prompt-recursion-depth > + (1+ comint--prompt-recursion-depth))) > + (if (> comint--prompt-recursion-depth 10) > + (message "Password prompt recursion too deep") > + (when (get-buffer-process (current-buffer)) > + (comint-send-invisible prompt)))))) > + (current-buffer))))) > =0C > ;; Low-level process communication > > diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el > index ec1a07b7e2f..5603fef90a4 100644 > --- a/lisp/eshell/esh-mode.el > +++ b/lisp/eshell/esh-mode.el > @@ -182,6 +182,18 @@ eshell-password-prompt-regexp > :type 'regexp > :version "27.1") > > +(defcustom eshell-password-prompt-max-length 256 > + "The maximum amount of text to examine when matching password prompts. > +When non-nil, only examine the last N characters of a block of output. > +If nil, examine all the output. > + > +This is used by `eshell-watch-for-password-prompt' to reduce the amount > +of time spent searching for password prompts." > + :version "30.1" > + :type '(choice natnum > + (const :tag "Examine all output" nil)) > + :group 'comint) > + > (defcustom eshell-skip-prompt-function nil > "A function called from beginning of line to skip the prompt." > :type '(choice (const nil) function)) > @@ -949,19 +961,22 @@ eshell-watch-for-password-prompt > This function could be in the list `eshell-output-filter-functions'." > (when (eshell-head-process) > (save-excursion > - (let ((case-fold-search t)) > - (goto-char eshell-last-output-block-begin) > - (beginning-of-line) > - (if (re-search-forward eshell-password-prompt-regexp > - eshell-last-output-end t) > - ;; Use `run-at-time' in order not to pause execution of > - ;; the process filter with a minibuffer > - (run-at-time > - 0 nil > - (lambda (current-buf) > - (with-current-buffer current-buf > - (eshell-send-invisible))) > - (current-buffer))))))) > + (goto-char (if eshell-password-prompt-max-length > + (max eshell-last-output-block-begin > + (- eshell-last-output-end > + eshell-password-prompt-max-length)) > + eshell-last-output-block-begin)) > + (when (let ((case-fold-search t)) > + (re-search-forward eshell-password-prompt-regexp > + eshell-last-output-end t)) Could this be simplified using re-search-backward with the BOUND argument instead? > + ;; Use `run-at-time' in order not to pause execution of the > + ;; process filter with a minibuffer. > + (run-at-time > + 0 nil > + (lambda (current-buf) > + (with-current-buffer current-buf > + (eshell-send-invisible))) > + (current-buffer)))))) > > (custom-add-option 'eshell-output-filter-functions > 'eshell-watch-for-password-prompt) > -- > 2.25.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 16 08:29:18 2024 Received: (at 71576) by debbugs.gnu.org; 16 Jun 2024 12:29:18 +0000 Received: from localhost ([127.0.0.1]:52479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIp0X-0003yF-Ut for submit@debbugs.gnu.org; Sun, 16 Jun 2024 08:29:18 -0400 Received: from mout.gmx.net ([212.227.15.15]:43405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIp0V-0003xt-Vq for 71576@debbugs.gnu.org; Sun, 16 Jun 2024 08:29:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1718540948; x=1719145748; i=michael.albinus@gmx.de; bh=B7tjTAxv9hPLRO0adzRftNiAvm7Sopa5JUYPdge3Z/I=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=imS6X41k4P1NAYrVUkWqH9gF0bRP+OvyR0lEvcw1wYRLm1EoSV8qf8v/NKI54DTf GihLu347vixm6BvxE3Vb2xNFp+vd8F29bvbWIP4d30Fo9Q+CjEsuGEzgbVb4CVCLb QHiQaZzyOxZoe4aP04oAHIN8sj2OGh1e17nTnQI7QdcLcHSuM39FVCtQentIU933W u170tifraTBgGQrLHxF72zLRmz3+klCkVwacFRDEf1hKLj85Fht74aaodGQy7S1b0 KPRcMcgR+FceUkodpkufTPC2gwB2yEQSBXciDQ78fHSMVhxt4WwLTFoh4RBL//o1v 9gczQNT8utIo8jPnZA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N6sn7-1sSFeW3cdD-016VsZ; Sun, 16 Jun 2024 14:29:07 +0200 From: Michael Albinus To: Stefan Kangas Subject: Re: bug#71576: 30.0.50; [PATCH] Improve performance of Comint/Eshell password prompt handling In-Reply-To: (Stefan Kangas's message of "Sun, 16 Jun 2024 03:53:46 -0700") References: Date: Sun, 16 Jun 2024 14:29:05 +0200 Message-ID: <874j9t6pgu.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:88TpcWWZTA+qZGo0JzMfLhLcpthcYz0c0s7blZnXv+D1FWuRTjj BdyNJAuQ/vaCraeA0iiZBypXucTp0KssyVxAIlb6f5lwROE+p59Z2VKGtYG7A4Zz5bo7rJN 26oGF0xxf/pUH6NMLRKU0VFSkHxL5geHLIOAgI09n2IFNRLFVji7y/5mvEsS35Z5TSqiOdc 9Hg5rtCDeld+0HHUfvt7A== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:BezDVfZWf08=;s3Sqn5YJEIR3DPEsz4AjxIHzl4R HlKUb6dlsSHIxJyRQpQuzpd1lAEror4VhBHodYHASdM9vSbSbEs4fv1JGo8v1+qEH2svu7Ji+ /VqbKRL8H/DVfZYCoYLms0SRrDnxiZdIKkzti1yR1qtK/Ey6Jb0ial9m7xfMlnord2JYciD/0 l3AVW/zzUkpYi2PJf70I3fUgpAL8yJsQ8LgqixkX9JU9DZ18xMoQ89inwjW0Y9cctUHWfn2We CKue0bPDlhgzN2eCp1troYiVKdrOjiSjm4dzRwDqTI3ipHSGSHwFkP4QQoYMshZyeuM37jcP+ 18C8WC2Q0UChUZWrvuKzsqqVJu827dxu9lJiftdzOChzGSPweS0MaXP1c57fiAOhi6VcutCw+ W5p05v5R5AkYT5+4OL2jfMz/IiZ2/15jQpxeRuxWubGc4WbxmMStiFupE6PPXWM1td5hdfsVA szTnmaDYEMhiC9CQjmtqgLLawblgwd5PG4lm2IyHmvk8iqpsV1AQDYH1HmpE3QALCHF2tD9Hr ze3ZJ3KIV5KBDH6eCftXf19F0Bwfdzv+1N4yelbCxtFroE76qwwkRb3Rt41wtNQCR8SkSqCrc ZzKZz9E9ufWusfV5sHWpgSSSyP5pBZmmxkqOhR8FmmFybCtwFL7EG0P3vDzg0IgA4otPJ90WM f3ly0wezOROe9qyYhkVAKdz4wna3yd2gBA9EcuZbw79wX51nRK8ssom7vuHAn7m4ecU08SlJ6 VwY8aLSZKsHNAYjaIMlpiFF1CFdVjjDVs0021zVobmMr3WVbIioFTvsmrIMx44da8UAivh2iM CwT0KmM6AyIBM2n3sFUZMXue4LgAyKcc3zQvGZIhmnNYM= X-Spam-Score: 2.8 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Stefan Kangas writes: Hi Stefan, >> +(defcustom comint-password-prompt-max-length 256 >> + "The maximum amount of text to examine when matching password prompts. >> +When non-nil, only examine the last N characters of a block of outp [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [185.89.38.155 listed in zen.spamhaus.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.15 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.15.15 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 71576 Cc: Jim Porter , 71576@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.8 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Stefan Kangas writes: Hi Stefan, >> +(defcustom comint-password-prompt-max-length 256 >> + "The maximum amount of text to examine when matching password prompts. >> +When non-nil, only examine the last N characters of a block of outp [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [185.89.38.155 listed in zen.spamhaus.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.15 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.15.15 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (michael.albinus[at]gmx.de) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Stefan Kangas writes: Hi Stefan, >> +(defcustom comint-password-prompt-max-length 256 >> + "The maximum amount of text to examine when matching password prompts. >> +When non-nil, only examine the last N characters of a block of output. >> +If nil, examine all the output. >> + >> +This is used by `comint-watch-for-password-prompt' to reduce the amount >> +of time spent searching for password prompts." >> + :version "30.1" >> + :type '(choice natnum >> + (const :tag "Examine all output" nil)) >> + :group 'comint) > > If this is hardcoded in Tramp, are we sure that we need this as an > option? I'd suggest making it into a defconst or defvar instead. Tramp uses this value just "by experience", and to be on the safe side. I can imagine, that people know that prompts are much shorter in their case, say 25 bytes. A defcustom is OK in my eyes. (apply #'max (mapcar #'length password-word-equivalents)) => 14 Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 16 21:19:11 2024 Received: (at 71576) by debbugs.gnu.org; 17 Jun 2024 01:19:11 +0000 Received: from localhost ([127.0.0.1]:57685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ11b-0008H1-4a for submit@debbugs.gnu.org; Sun, 16 Jun 2024 21:19:11 -0400 Received: from mail-ot1-f50.google.com ([209.85.210.50]:45160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sJ11Z-0008Gn-Kj for 71576@debbugs.gnu.org; Sun, 16 Jun 2024 21:19:10 -0400 Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-6f8d0a00a35so3277285a34.2 for <71576@debbugs.gnu.org>; Sun, 16 Jun 2024 18:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718587082; x=1719191882; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=lK05lH3EtDDY9QZGsERyPbTqHK7uPQgM5c+fWfVqWG0=; b=Jky6CLLjI+bmzLEk/+4yIFmVcyXozgPIUmHznd8Rrr9utecAFUvbtfLGEh1mnDKm/u T4E01dQkLQWklc05eHye2xApYtjAA4msGGzNWl8/HSf+ov3kO1pRFUBbpInRX97B8R+8 bdvdajUI5bYGwl19efWM6In63WTcX6E3c+SkuISC23sPQv1fLkj0/Ou0oJLL+vAe0XLs 0+cQ0KIqjs8pS45TInOu/RnX6Gknga8Csp5hkI6eYTNfAddfFT1H5xa1rCn3rzAaT1f7 UQXVtlKmf/cbZqsR6teJiyFvG4dHPw0URJjx1RUh4qmIJArAYIDaZVDtS4lsP11ZsbbK FwJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718587082; x=1719191882; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lK05lH3EtDDY9QZGsERyPbTqHK7uPQgM5c+fWfVqWG0=; b=rs8wIJr1p0LfKDlO3Du7naFi4tX7YU6saO0KGWuW3dzz7bV3P06B79hokAS7Zbf13J TPOm26AYtGCEWqUJFagxqwWQ23wM/bgxyUNcYktyqGnAiZYW0esSLghC5aze0JRiZ1Gd /2SALJG26Ppc3yNQt7iRe+vpYBLzYzPLvTTI/VvUmeLtAfY2zmKZAQlhGlc3K5C7bwIs mA4BqsMnu++kO8pyF4p3dKJjZkfN24kIQAQ2zoK1hyIpNtwoTQEJvB+6h2oAPs3SSejP RdcgvdGCCfO2gPItUI2etbOU8AS3ipz1nmgp4/XGtjBlfmAGnYK+oqO05k67zJvnb/mr Z5vg== X-Forwarded-Encrypted: i=1; AJvYcCWsjG1TQaELgDXnaq+YoeGa3SbqcPv0jswkoADD23QhtMEoxc9WyGMy/KOlvsSDNuGcuiTCpmBqJ6XqXtFaTUWN75aepRw= X-Gm-Message-State: AOJu0YwHQ9sy80B7GIHz0en8xhpW5ceVCSOEMtFWvCXoFyg1Izb8WF+u tvEaBQJGhG6EsDOQ1RADhA8A7gK+WaSGHsDKfDHVD3VGehwy7g/C X-Google-Smtp-Source: AGHT+IFS/3IEf3max40mPSgTyQzWK4x10fUvXvhzSmRu6PamS+/31I+b21fa4OFeg/7JxHBqq6GRPg== X-Received: by 2002:a05:6870:8197:b0:258:434b:7295 with SMTP id 586e51a60fabf-258434b7457mr9197741fac.12.1718587082162; Sun, 16 Jun 2024 18:18:02 -0700 (PDT) Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-705ccb8d9a1sm6450383b3a.186.2024.06.16.18.18.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 16 Jun 2024 18:18:01 -0700 (PDT) Message-ID: <81f2ba94-65a3-7c20-5f73-4d898713eb7f@gmail.com> Date: Sun, 16 Jun 2024 18:18:01 -0700 MIME-Version: 1.0 Subject: Re: bug#71576: 30.0.50; [PATCH] Improve performance of Comint/Eshell password prompt handling Content-Language: en-US To: Stefan Kangas , 71576@debbugs.gnu.org References: From: Jim Porter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71576 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 6/16/2024 3:53 AM, Stefan Kangas wrote: > Thanks. I'd be okay with putting this patch in Emacs 30, but let's see > what other people think. Sounds good to me. >> +(defcustom comint-password-prompt-max-length 256 >> + "The maximum amount of text to examine when matching password prompts. >> +When non-nil, only examine the last N characters of a block of output. >> +If nil, examine all the output. >> + >> +This is used by `comint-watch-for-password-prompt' to reduce the amount >> +of time spent searching for password prompts." >> + :version "30.1" >> + :type '(choice natnum >> + (const :tag "Examine all output" nil)) >> + :group 'comint) > > If this is hardcoded in Tramp, are we sure that we need this as an > option? I'd suggest making it into a defconst or defvar instead. I don't have a strong opinion here, so I'll wait to see if a majority forms around this... >> + (goto-char (if eshell-password-prompt-max-length >> + (max eshell-last-output-block-begin >> + (- eshell-last-output-end >> + eshell-password-prompt-max-length)) >> + eshell-last-output-block-begin)) >> + (when (let ((case-fold-search t)) >> + (re-search-forward eshell-password-prompt-regexp >> + eshell-last-output-end t)) > > Could this be simplified using re-search-backward with the BOUND > argument instead? I tried, but since I think most of this logic is necessary, it just amounted to swapping the 'if' block with 'eshell-last-output-end'. Performance doesn't look any different, and I find the current way a bit more readable. (This could probably be simplified if we want to require that 'eshell-password-prompt-max-length' be non-nil though.) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 20 20:43:49 2024 Received: (at 71576-done) by debbugs.gnu.org; 21 Jun 2024 00:43:49 +0000 Received: from localhost ([127.0.0.1]:50199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKSNZ-0000SS-0J for submit@debbugs.gnu.org; Thu, 20 Jun 2024 20:43:49 -0400 Received: from mail-pf1-f180.google.com ([209.85.210.180]:46267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKSNX-0000SB-2d for 71576-done@debbugs.gnu.org; Thu, 20 Jun 2024 20:43:47 -0400 Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-7062c0ee254so1307377b3a.0 for <71576-done@debbugs.gnu.org>; Thu, 20 Jun 2024 17:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718930557; x=1719535357; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=FVCpQ9C9QtdvM5c03OqBfMSwiqU2AMLwdk4x/s3PPVs=; b=btZXNdNZIHaRBh+lEIz7nxzWlivv7l7+zMA4VD5d0wi7jw9AM1Rywgyef0foPF7U9A tTcAtwqJvjz2I43pP+OtbCjnX0e189uDxzEN8RgWJcij/+P2LLowUPi55wQ1a9fI3Mk+ V49x1+gj8Zq5XI9M0R2V0o5Q1RHMhUYcJVbAJ+eJ5jx9F5dibKB40BXt4z+1C8rP6FMt dYC7zLeVYiJUBz81KTW4RTkiwOPiX9ZXEKZz6F7nap+zkf8XnuUAvN3zCBFYgbmJVBHO hs0MohOth9iNA/fox0fpIZXDVchWsugkxQmQcREPgWcq5sfAvnZdcPq04do/TT/TYEvg sL1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718930557; x=1719535357; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FVCpQ9C9QtdvM5c03OqBfMSwiqU2AMLwdk4x/s3PPVs=; b=v3n7LpBE9spC5kH1GONl9P8VPa0+Nxaej74jW1DQCLYX3Y8NYtIcUCycYMnIdPoe5u 9u/Rya0NC+tgRJuyK9ApxWVI7zgFVzt4NtcGnSsyJQSgWC/zVdyrtvyPRXlwqXXJp+DU gUYy18EljaI5oGjOvLaUUkWqt7uXWN7uOPDYZDYTv2ipXPPDkov3cBqr7fYZmZ0HWcRu bOgNc4qhjLFs28v0+tcoQfTkfur4V4KQS/zJ5ZGO13hzDCDw6kfIn21fx1SZepEqYWjB wg0obCNCUPLDEJ/xMCRGEvVMClRGsG+l+KK+r42YqiXq41crWcqKJt8YsN1q5GovHGCL J8zg== X-Forwarded-Encrypted: i=1; AJvYcCU08uvVu3UNmRkA5/RAgNJEUdwBzpx2fT4TmBaxPXqX26V9764WzRXvPErg2/sIJbEmuCfGTmsIh3+DFIK9rDPT2c92efBjmndb8Q== X-Gm-Message-State: AOJu0YzZ0/8zZ11uyE8ftV5Kr8zvY7MS5K3KxTuUB0b9vZP2mCS+Y8av g12+LfZaajczRiBFhtuIsThWIELc9u0bx86iUph5wyBJDkRuR129 X-Google-Smtp-Source: AGHT+IGp5KePkVWJ2bWMJnutLWHgwXJ7Nk06fsrCFy5rT6F+RgGb0BwYWTzk93W6ydHXunRHzduzDQ== X-Received: by 2002:a05:6a00:1493:b0:704:32dc:c4e4 with SMTP id d2e1a72fcca58-7063675708bmr6268531b3a.1.1718930556898; Thu, 20 Jun 2024 17:42:36 -0700 (PDT) Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id d2e1a72fcca58-70652f03d0csm124064b3a.195.2024.06.20.17.42.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Jun 2024 17:42:36 -0700 (PDT) Message-ID: Date: Thu, 20 Jun 2024 17:42:36 -0700 MIME-Version: 1.0 Subject: Re: bug#71576: 30.0.50; [PATCH] Improve performance of Comint/Eshell password prompt handling Content-Language: en-US To: Stefan Kangas , 71576-done@debbugs.gnu.org References: From: Jim Porter In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 71576-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 6/16/2024 3:53 AM, Stefan Kangas wrote: > Thanks. I'd be okay with putting this patch in Emacs 30, but let's see > what other people think. [snip] > If this is hardcoded in Tramp, are we sure that we need this as an > option? I'd suggest making it into a defconst or defvar instead. Since no one else has expressed any concerns, I've merged this as 1a55e957ae5 to the master branch, replacing the defcustoms with defvars. From unknown Sat Aug 16 18:16:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Jul 2024 11:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator