From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: HaiJun Zhang Newsgroups: gmane.emacs.devel Subject: Re: Is it possible to change the recv buffer size dynamically for network process or subprocess? Date: Sun, 29 Mar 2020 09:44:41 +0800 Message-ID: References: <1de1c276-1bda-4ada-b3f4-7adaee296628@Spark> <837dz9c0n2.fsf@gnu.org> <838sjn9o5f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="5e7ffd8e_5e74c4d9_6dce" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="10791"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 29 03:45:32 2020 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 1jIN11-0002gc-KB for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Mar 2020 03:45:31 +0200 Original-Received: from localhost ([::1]:33462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIN10-0002jc-Ms for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Mar 2020 21:45:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55411) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jIN0V-0002Kf-7Q for emacs-devel@gnu.org; Sat, 28 Mar 2020 21:45:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jIN0T-0008J4-JU for emacs-devel@gnu.org; Sat, 28 Mar 2020 21:44:58 -0400 Original-Received: from mail-oln040092253031.outbound.protection.outlook.com ([40.92.253.31]:6545 helo=APC01-SG2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jIN0R-0008FX-Jr; Sat, 28 Mar 2020 21:44:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jjYV+GNSAJ/VF4Y74CogwWCpulOGFEZxbAvQXfTOuJEMkam/hbFS8O7EbG0z8u7fAWShPA2ZUbYKB31w4w+UfqzY6/6pvEHmNLipaRgFzN3luwsV39YxIQO/b7QUcCnNOYC5gmnuw6aREtdbQYq7PVf6FOBjeEnXWCV/o6Vg1naZHlMMRm4g7g7baSq/25svp9eT86Cm/8p9M2NRWBkgxbVWiemXTNDSwB6RYhbL8I6k0vhF4qvOesglrICVCVhY9Lr7TKXDRyjxlRGYGr81NFRnhmuh/Xaqr/DtJqtrbN3xf9T2W3DaAfCZA3p92R09UsfpHZ/D20uB+BnZbibQwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a4rhSc9SrXnwn7WENCVXIYYuQuALfTdl6stoqYbaCMc=; b=XdAgY8xD3o+ZzbNiyu0KoekYgKK/QkOiE0ded+5KHfmUlrsN+FmPN+NtJso/0QXG31KUzdYkac/6DPpjBE1aGBl1N8Q63b4zjaMlaZ5mduQJuWOFRL2/PjGYeBPE+OUSi/Yl5V0cmmpszUoahHLFkIWeqiB7XVTtU+e+XwwaVQ/Vud5B7c5/IaFGVRiSTT9ZpzikVkrkCVBbfEOAQRYNVFbB0k57g0xVEeqd9LMePaKd7SkuxTLmJeXkqGxs+o0uc0jqlts2gEq8W5Sob1+myBt11JinEBfgwtULIq1hBLDt0EfM/OQByBY9iabBe2iXuC1arRPlUMiUBcuGySxFsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=outlook.com; dmarc=pass action=none header.from=outlook.com; dkim=pass header.d=outlook.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=a4rhSc9SrXnwn7WENCVXIYYuQuALfTdl6stoqYbaCMc=; b=ayWGY7QQZv4gTJ1QV5+9t/+OFIh5V8SnMuJUJ33fwvft7gV05bIgVU7hf0HToAabzZ8PSRO5ovtNFklyWN50XaXf3fGHH0YTBPFpQBpnLE2tNYOhRtt5p2fbjKg2+FF4BMt5KCDs5laJIo/FYg4oLMP/175LcgiejbQcSgx+fyJw/63/HFpCJejhE5fE9pj4KO2T3NrZMQ/Qudsqz8sRWuyTYlg8b6ToyMv8ydcfTouaeSUcWhdZdB88RMUQLCPug23dahNCT0F33HAUyiwjMb1RZoWs+3s7Zfy7Qq9e/6LV2YpS+QNDXhLE6GzXpo7tEhQmrRUCkmV6SRWJJfhYpg== Original-Received: from HK2APC01FT005.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::4b) by HK2APC01HT120.eop-APC01.prod.protection.outlook.com (2a01:111:e400:7ebc::383) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17; Sun, 29 Mar 2020 01:44:50 +0000 Original-Received: from PS1PR03MB3606.apcprd03.prod.outlook.com (10.152.248.56) by HK2APC01FT005.mail.protection.outlook.com (10.152.248.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.17 via Frontend Transport; Sun, 29 Mar 2020 01:44:50 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:3E3F23E747720FFC2C5A2E9628D732DFC635EA9DCFFD50AF717C2161920D9244; UpperCasedChecksum:D976AE8D78319DC8AF4666079AD9D933AE5195FE3ADED72AB94BC371D5E4C124; SizeAsReceived:9264; Count:49 Original-Received: from PS1PR03MB3606.apcprd03.prod.outlook.com ([fe80::85cb:c430:1173:7716]) by PS1PR03MB3606.apcprd03.prod.outlook.com ([fe80::85cb:c430:1173:7716%5]) with mapi id 15.20.2878.013; Sun, 29 Mar 2020 01:44:50 +0000 In-Reply-To: <838sjn9o5f.fsf@gnu.org> X-Readdle-Message-ID: bf911518-b280-4e07-be09-c58d088b8f7b@Spark X-ClientProxiedBy: HK2PR06CA0011.apcprd06.prod.outlook.com (2603:1096:202:2e::23) To PS1PR03MB3606.apcprd03.prod.outlook.com (2603:1096:803:4e::17) X-Microsoft-Original-Message-ID: X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from [192.168.1.150] (1.196.186.57) by HK2PR06CA0011.apcprd06.prod.outlook.com (2603:1096:202:2e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.19 via Frontend Transport; Sun, 29 Mar 2020 01:44:49 +0000 X-Readdle-Message-ID: bf911518-b280-4e07-be09-c58d088b8f7b@Spark X-Microsoft-Original-Message-ID: X-TMN: [lN4MCMq0whkZQ8+p0Epbj2NzOWkgAqXy] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 49 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 5b3885d4-4fab-4e50-0239-08d7d382c552 X-MS-TrafficTypeDiagnostic: HK2APC01HT120: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c5kk9zTCKhlI/tsZwHTjX89dQExFwsS74Q+Quyb0JDgBelr1Lu/iJVtr+7yzeuubPZFcujF8cAjAXskMo2pU11iyOoZHFDsaXwP+2t4WdtyJsr79C3mYJmHln01OfenNLS0dKM6VajgYIJvlbI1xWl0BGKeI5oFQYGvQMfOud8IWURNQhFnrtZxRmHzkpF1K X-MS-Exchange-AntiSpam-MessageData: Ba9gCsnmZ5Gmn5btlpvkIa053QAjdcoys3JoU+jerpCCsUtYjQXze774T6QHbu+cypmmHHiDnLWX6RZE9txP9GATCzNuDAwuR0EeYa6bZf+vrSizbupqxTeoF/kL3d5VwKJkWhVBY4/nzFMiRKHD4g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b3885d4-4fab-4e50-0239-08d7d382c552 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2020 01:44:50.8348 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2APC01HT120 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.253.31 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:245918 Archived-At: --5e7ffd8e_5e74c4d9_6dce Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =46or example, when I run find or grep in a directory with plenty of file= s, the output of the subprocess may continue for 1 minute, while I can=E2= =80=99t stop it. =E5=9C=A8 2020=E5=B9=B43=E6=9C=8826=E6=97=A5 +0800 PM10:38=EF=BC=8CEli Za= retskii =EF=BC=8C=E5=86=99=E9=81=93=EF=BC=9A > > Date: Thu, 26 Mar 2020 21:43:31 +0800 > > =46rom: HaiJun Zhang > > Cc: monnier=40iro.umontreal.ca, rpluim=40gmail.com, emacs-devel=40gnu= .org > > > > If too many data arrives, emacs may be unresponsive. > > > > Unresponsive due to what processing=3F Are you saying that just > > =5Freceiving=5F the data takes most of the time=3F I think what takes= most > > of the time is the processing by the filter function, in which case > > making the filter function process just the few first characters will= > > do. > > > > Yes. I want to block the sender for some time. It is like to limit th= e bandwidth to 500KB/s or 10 packets/s. > > I don't see how this will help anything, sorry. --5e7ffd8e_5e74c4d9_6dce Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
For example, when I run find or grep in a directory with = plenty of files, the output of the subprocess may continue for 1 minute, wh= ile I can=E2=80=99t stop it.
=E5=9C=A8 2020=E5=B9=B43=E6=9C=8826=E6=97= =A5 +0800 PM10:38=EF=BC=8CEli Zaretskii <eliz@gnu.org>=EF=BC=8C= =E5=86=99=E9=81=93=EF=BC=9A
Date: Thu, 26 Mar 2020= 21:43:31 +0800
From: HaiJun Zhang <netjune@outlook.com>
Cc: monnier@iro.umontreal.ca, rpluim@gmail.com, emacs-devel@gnu.org

If too many data arrives, emacs may be unresponsive.

Unresponsive due to what processing? Are you saying that just
_receiving_ the data takes most of the time? I think what takes most
of the time is the processing by the filter function, in which case
making the filter function process just the few first characters will
do.

Yes. I want to block the sender for some time. It is like to limit the band= width to 500KB/s or 10 packets/s.

I don't see how this will help anything, sorry.
--5e7ffd8e_5e74c4d9_6dce--