Bash-completion is very slow on MSYS2 when the current user is a domain user. This describes the cause and the solutions.
Expansion of ~* is very slow when you use a domain user. For example:
| #!/bin/bash | |
| # | |
| # check_unused_bash_completion.sh | |
| # | |
| # Check unused bash_completion files and moves them into "unused" | |
| # subdirectory. Loading many completion files makes Cygwin/MSYS bash | |
| # very slow. | |
| # |
| #include <cstdio> | |
| #include <iostream> | |
| #include <windows.h> | |
| class Foo { | |
| public: | |
| Foo() { | |
| OutputDebugStringA("Foo::Foo()\n"); | |
| //std::cout << "Foo::Foo()\n"; | |
| //std::printf("Foo::Foo()\n"); |
| REGEDIT4 | |
| [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] | |
| "DisableUNCCheck"=dword:00000001 | |
| From f0627cd357082ba27e914810bdfbc47e80e37c92 Mon Sep 17 00:00:00 2001 | |
| From: "K.Takata" <[email protected]> | |
| Date: Sat, 25 Jul 2015 21:09:11 +0900 | |
| Subject: [PATCH] Support MSVC | |
| Based on Ruby 2.2's patch: | |
| https://github.com/ruby/ruby/blob/ruby_2_2/ext/fiddle/win32/libffi-3.2.1-mswin.patch | |
| --- | |
| src/x86/ffi.c | 21 +++++++++++++++------ | |
| src/x86/ffitarget.h | 2 ++ |
| From 0d28151eb1de2b3f8196c611d488be8496ad02c0 Mon Sep 17 00:00:00 2001 | |
| From: MURAOKA Taro <[email protected]> | |
| Date: Thu, 2 Feb 2012 01:14:15 +0900 | |
| Subject: [PATCH 1/7] make compilable for 32bit Windows | |
| --- | |
| src/.gitignore | 8 +++++ | |
| src/Attrib.c | 2 +- | |
| src/Make_msvc.mak | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
| src/RdFToI.c | 1 + |
| --- Tmain/alias-for-unknown-language.d/stderr-actual.txt 2015-08-08 16:01:59.918759200 +0900 | |
| +++ Tmain/alias-for-unknown-language.d/stderr-expected.txt 2015-07-09 22:37:01.408106900 +0900 | |
| @@ -1 +1 @@ | |
| -C:\WORK\universal-ctags\ctags.exe: Unknown language "nosuchlang" in "alias-nosuchlang" option | |
| +ctags: Unknown language "nosuchlang" in "alias-nosuchlang" option |
| #include <windows.h> | |
| #include <stdio.h> | |
| #include <conio.h> | |
| #include <io.h> | |
| int main() | |
| { | |
| HANDLE hScr, hConOut; | |
| DWORD written; | |
| int c; |
| #include <stdio.h> | |
| int main() | |
| { | |
| int i, d, n, ret; | |
| char *strs[] = {"3", "3x", "3\x80", "3\xf0", "3\xfe", "3\xff"}; | |
| for (i = 0; i < sizeof(strs) / sizeof(strs[0]); i++) { | |
| ret = sscanf(strs[i], "%d%n", &d, &n); | |
| printf("str=%s: d=%d, n=%d, ret=%d\n", strs[i], d, n, ret); |
| " Encode a 32-bit integer into a 5-byte string. | |
| function! s:encode_size(n) | |
| " Set each bit7 to 1 in order to avoid NUL byte. | |
| return printf("%c%c%c%c%c", | |
| \ ((a:n / 0x10000000) % 0x80) + 0x80, | |
| \ ((a:n / 0x200000) % 0x80) + 0x80, | |
| \ ((a:n / 0x4000) % 0x80) + 0x80, | |
| \ ((a:n / 0x80) % 0x80) + 0x80, | |
| \ ( a:n % 0x80) + 0x80) | |
| endfunction |