From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Bogdan Sirb Newsgroups: gmane.emacs.bugs Subject: bug#24143: 25.1; Windows performace of process-send-string Date: Thu, 4 Aug 2016 11:40:20 +0000 (UTC) Message-ID: <333655155.11634740.1470310820582.JavaMail.yahoo@mail.yahoo.com> References: <601571075.10415562.1470227331338.JavaMail.yahoo.ref@mail.yahoo.com> <601571075.10415562.1470227331338.JavaMail.yahoo@mail.yahoo.com> <8337mln6zt.fsf@gnu.org> Reply-To: Bogdan Sirb NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11634739_1933034642.1470310820576" X-Trace: blaine.gmane.org 1470311069 17064 195.159.176.226 (4 Aug 2016 11:44:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Aug 2016 11:44:29 +0000 (UTC) Cc: "24143@debbugs.gnu.org" <24143@debbugs.gnu.org> To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 04 13:44:24 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 1bVH4V-000398-6J for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Aug 2016 13:44:19 +0200 Original-Received: from localhost ([::1]:39118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVH4R-0001QU-TT for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Aug 2016 07:44:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVH4J-0001Nx-Fx for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 07:44:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bVH4E-0006KT-C2 for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 07:44:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bVH4E-0006KP-8K for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 07:44:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bVH4D-0001Cp-U0 for bug-gnu-emacs@gnu.org; Thu, 04 Aug 2016 07:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bogdan Sirb Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Aug 2016 11:44:01 +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.14703110134592 (code B ref 24143); Thu, 04 Aug 2016 11:44:01 +0000 Original-Received: (at 24143) by debbugs.gnu.org; 4 Aug 2016 11:43:33 +0000 Original-Received: from localhost ([127.0.0.1]:55257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVH3l-0001C0-D7 for submit@debbugs.gnu.org; Thu, 04 Aug 2016 07:43:33 -0400 Original-Received: from nm48.bullet.mail.gq1.yahoo.com ([67.195.87.84]:46250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVH3i-0001Bn-Ie for 24143@debbugs.gnu.org; Thu, 04 Aug 2016 07:43:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1470311004; bh=eW+S39m37jl0QXxnnn2aH5moK23OlUWE8eJz1f/GXH0=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=j9NDtuWGaXc/CdvMvTWKa3RH1RVoeQQFZfuMd54/jnzettGTaoulhfWDYXGEZe9MV2/coim2wLDQV6VVx/ZCuy1LnvVfk4FuOX2amuN1cdARfCKzhabJPbjLXwr1HPq38uX6IdAC3ax6DC4uflYR1ScOtGlJ7b5zO5oKygt9QGGNir6sicEKYhQl3/N3Hh7AGNM8U5HfJfgE8eEyfj+pufnPEKGpW8gHzAVDexmQJvxPmBRocxnmUIKAi9P6bKN3LcWSCicJjm08McLu4rcRV/qg2E1UnEATdWsEHv/whNJiDwu4GnkDk9r90OioeZJlooLhk+tfHuwJe4epDgSOSA== Original-Received: from [127.0.0.1] by nm48.bullet.mail.gq1.yahoo.com with NNFMP; 04 Aug 2016 11:43:24 -0000 Original-Received: from [98.137.12.191] by nm48.bullet.mail.gq1.yahoo.com with NNFMP; 04 Aug 2016 11:40:23 -0000 Original-Received: from [98.139.170.182] by tm12.bullet.mail.gq1.yahoo.com with NNFMP; 04 Aug 2016 11:40:23 -0000 Original-Received: from [98.139.212.223] by tm25.bullet.mail.bf1.yahoo.com with NNFMP; 04 Aug 2016 11:40:23 -0000 Original-Received: from [127.0.0.1] by omp1032.mail.bf1.yahoo.com with NNFMP; 04 Aug 2016 11:40:23 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 11582.77325.bm@omp1032.mail.bf1.yahoo.com X-YMail-OSG: DuKtxRMVM1kc413ZCH2G7i.gyW.CUfB1WY1cfjAfVnEO4q6M0elvcvxDjWqTTQ_ 4vo7Zuc0tZ378sDaHfFnhEujvHn1hWnt6QYfbbHYoD_60815Mf_fylKnsFzD1p2S05c.G33et9N6 zLK8pgsLODqRrre5TGG8.0dEO93bkdDGLNq_xCCG3zrazypZTlN0td6ADa_OMSJoOWlcCi8h8213 Va2SIBmVqpuZ4A5IaiLkXoAWcjE1PZ7vYdHAcPsEYU1hggO2XuZWWCRrEPmRyHAh9tZL0PisQPBn t2i1ymUFU4dOiLLlsu.SvnjD108gAUaCY4lpFMs4o4kZyhqlXQv1GUHsNTPpoQVk7J6oEeHa.HMn lg2EgxtszJWlK2kdLiMutRGNE9HOqYPv4j0YmdxAJKWva4bOBnJV_3KAZD1JbNyLXQySgwi2S5zA cY5pK8x5x4HhC4sJ6EkAb_GPImCEozd0KLptWtumD.m9uJnT_s5iQF6mE5R52uDQz57BzFBezguh yYcjH0tLI8umwLg8pe7JhDkivwPjwiURMsMvFx3by9QcQV1jR Original-Received: from jws106159.mail.bf1.yahoo.com by sendmailws160.mail.bf1.yahoo.com; Thu, 04 Aug 2016 11:40:22 +0000; 1470310822.439 In-Reply-To: <8337mln6zt.fsf@gnu.org> 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:121815 Archived-At: ------=_Part_11634739_1933034642.1470310820576 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Emacs 24.5 was the one found in the repository of msys2 found https://msys2.github.io/ I also tried the standard one found on emacs websi= te and the results were the same. But doing a (setq w32-pipe-buffer-size (* 10 4096)) fixed the problem. Now I have the following: * emacs 24.5: 0.037496 * emacs 25.1: 0.040418 But, if I'm doing a (setq w32-pipe-buffer-size (point-max)) to send the who= le file at once once, I get a stunning 0.0010007 per call. Is there any implications to doing this ? Thanks! On Wednesday, August 3, 2016 7:38 PM, Eli Zaretskii wrot= e: =20 > Date: Wed, 3 Aug 2016 12:28:51 +0000 (UTC) > From: Bogdan Sirb >=20 > 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/). >=20 > I created a small c++ program to read from stdin: >=20 > std::cin >> fileSizeStr; > std::streamsize length =3D std::stoi(fileSizeStr); > char *content =3D (char *)malloc(length); > std::cin.read(content, length); >=20 > and sent data to it with the follogiwn emacs code : >=20 > ;; 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)))) >=20 > 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): >=20 > * emacs 25.1: 0.510064 seconds/call > * emacs 24.5: 0.037496 seconds/call >=20 > And for a simple C program with fread(..., stdin) instead of std::cin >=20 > * emacs 25.1: 0.547136 seconds/call > * emacs 24.5: 0.031285 seconds/call >=20 > 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=3Dx86_64-w64-mingw32 --with-wide-int=3Dyes > --with-sound=3Dyes --with-file-notification=3Dyes --without-gpm > --without-gconf --without-gsettings --without-selinux --with-modules > 'CFLAGS=3D-march=3Dnative -mtune=3Dnative -pipe -O3 -fomit-frame-pointer > -funroll-loops' 'CPPFLAGS=3D-mtune=3Dnative -march=3Dnative -DNDEBUG -isy= stem > /mingw64/include' 'LDFLAGS=3D-s -Wl,-s'' The above says how Emacs 25.1 was built, but you didn't give the same info about Emacs 24.5.=C2=A0 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? ------=_Part_11634739_1933034642.1470310820576 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Emacs 24.5 was the one found in the repository of= msys2 found
https://msys2.github.io/ I also tried the standard one foun= d on emacs website
and the results were the same.

But doing a (se= tq w32-pipe-buffer-size (* 10 4096)) fixed the problem.

Now I have t= he following:

* emacs 24.5: 0.037496
* emacs 25.1: 0.040418
But, if I'm doing a (setq w32-pipe-buffer-size (point-max)) to send the w= hole
file at once once, I get a stunning 0.0010007 per call.

Is t= here any implications to doing this ?

Thanks!


On Wednesday, August 3, 201= 6 7:38 PM, Eli Zaretskii <eliz@gnu.org> wrote:


> Date: Wed, 3 Aug 2016 12:28:51 +0000 (UTC)

> From: Bogdan Sirb <bogdans91@yahoo.com>
>
> I noticed a performace issue with emacs 25.1 (built with Min= GW on
> windows 10, but I used the one at
> https://sourceforge.net/project= s/emacsbinw64/).
>
> I creat= ed a small c++ program to read from stdin:
>
> std::cin >> fileSizeStr;
> std::s= treamsize length =3D std::stoi(fileSizeStr);
> char *c= ontent =3D (char *)malloc(length);
> std::cin.read(con= tent, 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)
> (buff= er-substring (point-min) (point-max))))
>
> I used elp-instrument-function for process-send-string and I go= t 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.510= 064 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 2= 016-08-01 built on CSIRB-DEV
> Windowing system distri= butor 'Microsoft Corp.', version 10.0.10586
> Configur= ed using:
> 'configure --build=3Dx86_64-w64-mingw32 --= with-wide-int=3Dyes
> --with-sound=3Dyes --with-file-n= otification=3Dyes --without-gpm
> --without-gconf --wi= thout-gsettings --without-selinux --with-modules
> 'CF= LAGS=3D-march=3Dnative -mtune=3Dnative -pipe -O3 -fomit-frame-pointer
> -funroll-loops' 'CPPFLAGS=3D-mtune=3Dnative -march=3Dnati= ve -DNDEBUG -isystem
> /mingw64/include' 'LDFLAGS=3D-s= -Wl,-s''


The above says how Ema= cs 25.1 was built, but you didn't give the same
info abou= t Emacs 24.5.  Could you please provide the same info for
that build?

Also, does it help t= o set w32-pipe-buffer-size in Emacs 25.1 to some
non-defa= ult value, like 30000?



------=_Part_11634739_1933034642.1470310820576--