From owner-freebsd-ports@freebsd.org Thu Apr 11 13:16:55 2019 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EED61584834 for ; Thu, 11 Apr 2019 13:16:55 +0000 (UTC) (envelope-from alex@zagrebin.ru) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id E25CB8E0C7 for ; Thu, 11 Apr 2019 13:16:54 +0000 (UTC) (envelope-from alex@zagrebin.ru) Received: by mailman.ysv.freebsd.org (Postfix) id A16C81584833; Thu, 11 Apr 2019 13:16:54 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8FB4D1584832 for ; Thu, 11 Apr 2019 13:16:54 +0000 (UTC) (envelope-from alex@zagrebin.ru) Received: from mail.zagrebin.ru (mail.zagrebin.ru [IPv6:2001:470:1f15:30e::1:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA5F28E0C6 for ; Thu, 11 Apr 2019 13:16:53 +0000 (UTC) (envelope-from alex@zagrebin.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zagrebin.ru ; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=IxNzCBaAZas3xS8746m/wVFxkBbV0LQEGQImvx4IQYQ=; b=VkqrpVWHwakaS3pwI6HSHQwfNB SnrUxGhp7+UiDG3zsmGhfG6qdQtocbWcyh4ffvcZdhQdkOZsQwKd/A8C7v/4jIGr+vEczlesoE6sp o8s4N/dEVToJhzNl9m3HpXvTfxYegkOLaGjgn4rtyLYWAoqMeLKwC1BBOKeDjobzn0hDAXJ+BeDns WCWSdi7fAQ/nI7PtpYVLUq/DDrBrZJmYjCiYqTtHYMCyQAwnJVo6+m4kN8eFcycezW1IDBkelQ3bA oj/69WSM3P8UVfpO6dlN4Rhcdchee9cYfXVWcCv0Otj3zKqhqBC/pxcWFyeTVMFUp2eYEyxlEuwlo kFeBoKlA==; Received: from [2001:470:1f15:30e::2] (helo=vm2.home.zagrebin.ru) by mail.zagrebin.ru with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92 (FreeBSD)) (envelope-from ) id 1hEZZS-000LIZ-9f for ports@freebsd.org; Thu, 11 Apr 2019 16:16:50 +0300 Date: Thu, 11 Apr 2019 16:16:49 +0300 From: Alexander Zagrebin To: ports@freebsd.org Subject: python 3 subprocess performance Message-ID: <20190411161649.1b740d21@vm2.home.zagrebin.ru> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; amd64-portbld-freebsd11.2) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Apr 2019 13:16:55 -0000 Hi! I've noticed the subprocess performance issue with python 3. For example, this simple script takes just 0,15 second to complete with python 2.7, but more than 5 sec with python 3.6: import subprocess for i in range(100): p = subprocess.Popen(['uname', '-a'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) (stdoutdata, stderrdata) = p.communicate() Profiling with the cProfile shows, that this excessive 5 seconds was wasted in the "{built-in method posix.read}" Could anybody confirm this issue? -- Alexander Zagrebin