all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bogdan Sirb <bogdans91@yahoo.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "24143@debbugs.gnu.org" <24143@debbugs.gnu.org>
Subject: bug#24143: 25.1; Windows performace of process-send-string
Date: Thu, 4 Aug 2016 11:40:20 +0000 (UTC)	[thread overview]
Message-ID: <333655155.11634740.1470310820582.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <8337mln6zt.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2625 bytes --]

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 website
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 whole
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 <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 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?


  

[-- Attachment #2: Type: text/html, Size: 4959 bytes --]

  reply	other threads:[~2016-08-04 11:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <601571075.10415562.1470227331338.JavaMail.yahoo.ref@mail.yahoo.com>
2016-08-03 12:28 ` bug#24143: 25.1; Windows performace of process-send-string Bogdan Sirb
2016-08-03 16:37   ` Eli Zaretskii
2016-08-04 11:40     ` Bogdan Sirb [this message]
2016-08-04 14:57       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=333655155.11634740.1470310820582.JavaMail.yahoo@mail.yahoo.com \
    --to=bogdans91@yahoo.com \
    --cc=24143@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.