-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance with windows emacs 25.1 #321
Comments
Hello, Interesting feedback. I'm surprised it's not the process-send-string of buffer-substring that causes the issue. Did you also use format in your test? |
Hello, I re-did the test and the problem is emacs, not irony. This is the emacs code I used for the test:
The test.exe is a simple c++ program: The results were as follows for
And for a simple C program with
So I should report this to emacs mailing list instead. |
The difference is that the original program used a |
Thanks for the feedback, I appreciate. Please don't hesitate to post a link to the issue here has well, I will follow the thread and it can interest the people seeing this issue too. |
This is the issue, which apparently isn't one :) It's fixed by setting I also tested with irony-mode by doing a I don't know what other implications this have for now, but i will set it in my config to a higher value (64 kb) for now. |
Oh ok, maybe we should add it to: https://github.com/Sarcasm/irony-mode/tree/6e0a3f0df9306bda32dfe6097ffa014a23c05af6#windows-considerations |
Hi, I changed the default value of the variable in my configuration, just for curiosity/verification, for the new value according to your discussion:
OS: |
I changed the variable to |
That's the official response to what implications this change will have. I'm busy for the rest of the week, but I'll do some tests Monday and will come back. |
IIUC, the setting is for the whole irony-server process. You should not choose a size based on the current file but more on something that is good enough in the general case for irony-mode. What surprises me, is that from the documentation and reading of the mailing list posts you linked, I expect the default value for Let me know of your findings, thank you. |
So, after a long time, I'm back and finally had some time. For the last 2 months I ran with this in my emacs config:
The setup: There is no performance issue anymore. Maybe you can put this in the FAQ section for the new users. PS: Not related with this issue, but emacs starts faster and it's more responsive with the official build emacs-25.1-2-x86_64-w64-mingw32.zip and the deps from the same place |
Hello @Rompy, First thank you for your feedback, this is valuable. I added a new variable to irony-mode, which allow to set the value of Would you mind giving a try to this setting just to confirm it works for you on Windows? ;; Windows performance tweaks
;;
(when (boundp 'w32-pipe-read-delay)
(setq w32-pipe-read-delay 0))
;; Set the buffer size to 64K on Windows (from the original 4K)
(when (boundp 'w32-pipe-buffer-size)
(setq irony-server-w32-pipe-buffer-size (* 64 1024))) |
So i got the irony.el file from the last commit and set the I also re-tested without setting I think it's safe to use it as a 64 K (or even 32 K). But if you have big C/C++ files, consider increasing this. For example, for a 1 MB C file (>25.000 lines) it's still very slow. I increased |
Ok, thank you for the results, much appreciated. I'm wondering if the size of the pipe matters even for small buffers, for example if there is a lot of completion results. |
Yes it is. I did a quick test with I logged in |
Awesome, thank you! |
Using irony as the primary completion enigne in company with the latest emacs has a visible delay until showing candidates for a 210 kb .c source file.
After a
elp-instrument-package
I have this (for emacs 25.1):And for emacs 24.5:
irony-completion--send-request
: 0.0746239 (time per call)This is for the same .c file at the same position. If I do a
elp-instrument-function
forprocess-send-string
, 99% of that time is spend there.I first thought that this is an issue with
process-send-string
but I did a small test with emacs:I created a small program that read from
stdin
and wrote "SUCCESS" each time it read something and I sent it the same file from emacs withprocess-send-string
, and the results were very different:For emacs 24.5:
process-send-string
: 1.0931796 (time per call)And for emacs 25.1:
process-send-string
: 0.6128976 (time per call)I repeated the tests several times, and the results were the same, with small variations (2-5%).
So the issue isn't with
process-send-string
, but maybe it's something internal to irony-server.Note: I used emacs 24.5 from msys64 (mingw64 version) and an emacs 25.1 compiled by me with the same flags as emacs 24.5 with mingw64.
The text was updated successfully, but these errors were encountered: