From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24143: 25.1; Windows performace of process-send-string Date: Wed, 03 Aug 2016 19:37:42 +0300 Message-ID: <8337mln6zt.fsf@gnu.org> References: <601571075.10415562.1470227331338.JavaMail.yahoo.ref@mail.yahoo.com> <601571075.10415562.1470227331338.JavaMail.yahoo@mail.yahoo.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1470242413 2724 195.159.176.226 (3 Aug 2016 16:40:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2016 16:40:13 +0000 (UTC) Cc: 24143@debbugs.gnu.org To: Bogdan Sirb Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 03 18:40:08 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUzD3-0007nl-TC for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Aug 2016 18:39:58 +0200 Original-Received: from localhost ([::1]:35778 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUzD0-0004bx-CF for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Aug 2016 12:39:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUzCE-00047Q-E5 for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2016 12:39:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUzCA-0003R3-Cn for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2016 12:39:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUzCA-0003Qz-8l for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2016 12:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bUzCA-0006Oj-3V for bug-gnu-emacs@gnu.org; Wed, 03 Aug 2016 12:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Aug 2016 16:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24143 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24143-submit@debbugs.gnu.org id=B24143.147024230024540 (code B ref 24143); Wed, 03 Aug 2016 16:39:02 +0000 Original-Received: (at 24143) by debbugs.gnu.org; 3 Aug 2016 16:38:20 +0000 Original-Received: from localhost ([127.0.0.1]:54888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUzBO-0006Ne-HU for submit@debbugs.gnu.org; Wed, 03 Aug 2016 12:38:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bUzBI-0006NN-1O for 24143@debbugs.gnu.org; Wed, 03 Aug 2016 12:38:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUzB9-0002xk-KE for 24143@debbugs.gnu.org; Wed, 03 Aug 2016 12:38:02 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUzB9-0002xS-Gq; Wed, 03 Aug 2016 12:37:59 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3457 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bUzB7-0001nF-Bq; Wed, 03 Aug 2016 12:37:58 -0400 In-reply-to: <601571075.10415562.1470227331338.JavaMail.yahoo@mail.yahoo.com> (message from Bogdan Sirb on Wed, 3 Aug 2016 12:28:51 +0000 (UTC)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:121802 Archived-At: > Date: Wed, 3 Aug 2016 12:28:51 +0000 (UTC) > From: Bogdan Sirb > > I noticed a performace issue with emacs 25.1 (built with MinGW on > windows 10, but I used the one at > https://sourceforge.net/projects/emacsbinw64/). > > I created a small c++ program to read from stdin: > > std::cin >> fileSizeStr; > std::streamsize length = std::stoi(fileSizeStr); > char *content = (char *)malloc(length); > std::cin.read(content, length); > > and sent data to it with the follogiwn emacs code : > > ;; added this in the middle of a 162 kb file and eval'd it: > (setq proc (start-process "Test" nil "./test.exe")) > (process-send-string > proc > (format "%d\n%s\n" (point-max) > (buffer-substring (point-min) (point-max)))) > > I used elp-instrument-function for process-send-string and I got this > results (emacs 25.1 built by me vs emacs 24.5 found in msys2+mingw64 > repo, compiled with the same flags): > > * emacs 25.1: 0.510064 seconds/call > * emacs 24.5: 0.037496 seconds/call > > And for a simple C program with fread(..., stdin) instead of std::cin > > * emacs 25.1: 0.547136 seconds/call > * emacs 24.5: 0.031285 seconds/call > > In GNU Emacs 25.1.1 (x86_64-w64-mingw32) > of 2016-08-01 built on CSIRB-DEV > Windowing system distributor 'Microsoft Corp.', version 10.0.10586 > Configured using: > 'configure --build=x86_64-w64-mingw32 --with-wide-int=yes > --with-sound=yes --with-file-notification=yes --without-gpm > --without-gconf --without-gsettings --without-selinux --with-modules > 'CFLAGS=-march=native -mtune=native -pipe -O3 -fomit-frame-pointer > -funroll-loops' 'CPPFLAGS=-mtune=native -march=native -DNDEBUG -isystem > /mingw64/include' 'LDFLAGS=-s -Wl,-s'' The above says how Emacs 25.1 was built, but you didn't give the same info about Emacs 24.5. Could you please provide the same info for that build? Also, does it help to set w32-pipe-buffer-size in Emacs 25.1 to some non-default value, like 30000?