mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Make vim startup faster
It appears that GetFileAttributes(u"\\etc\\passwd") can take two seconds on Windows 10 at unpredictable times for reasons which are mysterious to me. Let's try avoiding that path entirely and pray to Microsoft it works
This commit is contained in:
parent
deb5e07b5a
commit
a5c0189bf6
5 changed files with 25 additions and 15 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "libc/intrin/describeflags.h"
|
||||
#include "libc/intrin/strace.h"
|
||||
#include "libc/nt/files.h"
|
||||
#include "libc/nt/runtime.h"
|
||||
#include "libc/nt/thunk/msabi.h"
|
||||
|
||||
__msabi extern typeof(GetFileAttributes) *const __imp_GetFileAttributesW;
|
||||
|
@ -30,7 +31,7 @@ __msabi extern typeof(GetFileAttributes) *const __imp_GetFileAttributesW;
|
|||
textwindows uint32_t GetFileAttributes(const char16_t *lpPathName) {
|
||||
uint32_t flags;
|
||||
flags = __imp_GetFileAttributesW(lpPathName);
|
||||
NTTRACE("GetFileAttributes(%#hs) → %s", lpPathName,
|
||||
DescribeNtFileFlagAttr(flags));
|
||||
NTTRACE("GetFileAttributes(%#hs) → {%s, %d}", lpPathName,
|
||||
DescribeNtFileFlagAttr(flags), GetLastError());
|
||||
return flags;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue