From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by sourceware.org (Postfix) with ESMTPS id 24A6B385BF9F for ; Sun, 22 Mar 2020 07:43:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 24A6B385BF9F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=towo.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo@towo.net Received: from [192.168.178.45] ([95.90.246.248]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MD9Kp-1j6sio3FSr-009APj for ; Sun, 22 Mar 2020 08:43:15 +0100 Subject: Re: New pty implementation is really slow To: cygwin@cygwin.com References: From: Thomas Wolff X-Tagtoolbar-Keys: D20200322084314295 Message-ID: <9ee9e561-322e-ae11-963e-d3e351e6b4ee@towo.net> Date: Sun, 22 Mar 2020 08:43:14 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:wA+4z71U22Lj2EBKcvO+x05+R3kmMFJkgqKNXNa/vVM3xio7Hik Is/0NFmuY7IwkrfTWWpfv4+FxU+oNHSGmor5Q62k7V7/xA24TmhFcJXX0JIWlaoDwLv+cuD ymMuI06A6p+SqEmSr23NM/3ntOzuqQVmGgmzimOl+/Bys3iIs7U72rWG6GgwSx91FXMCdXy fZk3x9/HqOZtF6njL28dw== X-UI-Out-Filterresults: notjunk:1;V03:K0:7rCBld27VcE=:0VzB1CxH7WLvRiVhAAknlh A7ZXTyO/16957OUI0B+FmrjfhFod3tThiAqpmEfU0J/94IEVdLXgegDDOJreD5gV008QjHSpJ 9b9zuuYi0SGd3yQkVNitpYe9UQEmasGg2HIK16DLP02V/70SsnF7EU1a2i+4UttCRY0CYdmkV iFtyP+riLDcZ3Nj736v7OY5hiAqlf3ft6nTNbBUEPM2lCKGvwex5w8kqFcp4WJL/2otNKQoEI IFJ6dZqmhDAiK+1Ijej/vNx7PdFAq8cqXkEM6910eR3Rd9yfWcUdk97LqNnkj3e16jZuigJBY Nkr2/Er9BFKdS96j26IZLgulX1iBJoTVTBC5IALd+3yvjQZo0A03ZdgjHU3w72TxNNvb2JMU8 eVeSruXJwsYBf4xXbf7xHr3+LujsSPc2BqpwDnasOJq8x4s933VyKeqDdgZrR42iQGMTXfym9 RQnAFK6poClGi9WEjYrDEdMMJAAXNlEsn8JuIFDhopDpOUYLMM66n/uBVqDNDSHYjuaP7/xUi +SXqjTDOBkA8EiMdpEGsPR/qcAj19RJ1wqVqgox7J6NdttMH0YMl8lLuckV2Z39QtUjFf0Dz4 du407ujouAtfMPm718Jz+L4PYXdVjMp5htATg0j6nu5LgmkfomA0V7ZNIoh5e03h+9gMzdXYB 3hJaAurcvugv+cWPxSmfCSkkWiJpszOddQnasSvltVMt6r8YX6RLRBFx8ZRhC86m4t5LbCsPc 6hqUwfxUfqhfaXr5GoElZ8tXr8ORZ727eOteZyMQNoDQxbcz0F5Ir/9NUzfFsPzJVasvRHH+c kyCYSDoftiVRipwlJua7GsNLLo5ZdeMVve5G6LU9lidc+tyS8A= X-Spam-Status: No, score=4.6 required=5.0 tests=BAYES_00, BODY_8BITS, GARBLED_BODY, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: **** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2020 07:43:19 -0000 Am 22.03.2020 um 06:51 schrieb Marco Atzeri via Cygwin: > Am 22.03.2020 um 04:21 schrieb Joe via Cygwin: >> I'm using cygwin 3.1.4 on Windows 10. >> >> The new pseudo terminal stuff seems really slow. >> >> For example: >> $ time seq 10000 >> (output omitted) >> real    0m23.510s >> user    0m1.515s >> sys     0m4.483s >> >> If I minimize the mintty window while seq is running, it gets >> slightly better: >> real    0m4.562s >> user    0m0.390s >> sys     0m1.202s >> >> But when I set CYGWIN=disable_pcon before starting mintty, I get: >> $ time seq 10000 >> (output omitted) >> real    0m0.366s >> user    0m0.109s >> sys     0m0.093s >> >> So the new implementation seems to be over 60 times slower than the >> old one. >> -- > > only factor 10x on my test, amd only impacting mintty case > Curious that 32bit disabled is 2x faster than 64bit disabled > > 64 bit > > Mintty with enabled (default) > > real    0m2.674s > user    0m0.234s > sys     0m0.859s > > mintty with disabled > > real    0m0.247s > user    0m0.015s > sys     0m0.046s > > CMD with enabled > real    0m1.121s > user    0m0.109s > sys     0m0.187s > > CMD with disabled > real    0m1.084s > user    0m0.078s > sys     0m0.312s > > 32 bit > > Mintty with enabled (default) > real    0m2.548s > user    0m0.281s > sys     0m0.686s > > Mintty with disabled > real    0m0.058s > user    0m0.030s > sys     0m0.000s > > CMD with enabled > real    0m1.021s > user    0m0.124s > sys     0m0.296s > > CMD with disabled > real    0m1.018s > user    0m0.109s > sys     0m0.265s > > I have the impression that the slow is due to some type of buffer > expansion as I seem to notice a not uniform progress of the print > the screen. But it could be just my eye... With disable_pcon, output is sent to mintty in bunches of 256 bytes at each read() invocation. With pcon enabled, typical output size is 12 bytes. That doesn't seem to be the whole story, though. Thomas