When comparing the time as blow:
let n = 1000
let t = reltime()
for z in range(n)
let a = 1
endfor
echo reltimestr(reltime(t))
let wid = win_getid()
let t = reltime()
for z in range(n)
call win_execute(wid, 'let a = 1')
endfor
echo reltimestr(reltime(t))
on vim8.2.3582:
0.009245
0.021792
on vim8.2.4058:
0.008434
0.991177
Looks like the latest vim becomes more than 50 times slower than before.
I am not sure which patch has caused this, but hope to resolve this issue.
8.2.4058
Windows 10
No response
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Here is the list of patches after 8.2.3582 containing the keyword win_execute in their commit messages:
I am not sure which patch has caused this, but hope to resolve this issue.
FWIW, I can't reproduce the issue. I get these timings:
0.004148
0.012403
The ratio is somewhere around 3, which looks similar to what you observe on 8.2.3582.
Maybe the issue is specific to Windows. In any case, it would help if you could:
For the last bullet point, on linux, you could try to run these shell commands from the Vim root directory:
make clean
make distclean
sed -i '/#PROFILE_CFLAGS = -pg -g -DWE_ARE_PROFILING/s/^#// ; /#PROFILE_LIBS = -pg -no-pie/s/^#//' src/Makefile
make
./src/vim -Nu NONE -S /tmp/issue.vim
gprof ./src/vim ./gmon.out
/tmp/issue.vim should contain the Vim script code necessary to reproduce the issue.
This requires the gprof(1) tool, which on Ubuntu is provided by the binutils package:
$ sudo apt install binutils
Unfortunately, I don't know enough about Windows in general to tell how all of this can be adapted to a Windows 10 system.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
I found that 8.2.3920, which is a win_execute() relevant patch, has caused this issue.
on vim8.2.3919:
0.007691
0.019335
on vim8.2.3920:
0.009243
1.000277
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
I found that 8.2.3920, which is a win_execute() relevant patch, has caused this issue.
In case it helps finding a fix, here is an explanation about the purpose of the patch.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
I suppose you are on a system where getcwd() or chdir() is slow.
I'll see if I can avoid them when no local directories or 'acd' is involved.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@rickhowe wrote:
on vim8.2.3920:
0.009243
1.000277
Is it a coincidence that it takes almost exactly 1 second
or is it an indication of a timeout somewhere?
What timing to you get if you make let n = 2000 instead
of let n = 1000 in your script?
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Thank you. I found the issue resolved now.
on vim8.2.4060:
0.008480
0.020767
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
@rickhowe wrote:
on vim8.2.3920:
0.009243
1.000277Is it a coincidence that it takes almost exactly 1 second or is it an indication of a timeout somewhere?
What timing to you get if you make
let n = 2000instead oflet n = 1000in your script?
I tried on my system;
when n=2000
0.019571
2.037047
when n=5000
0.046071
5.015006
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()