4 ms·
> It seems they are taking the same route as cygwin by "mounting" windows drives in /mnt/c (or /cygdrive/c). I wonder if this Unix filesystem layer will be abl
by mmebane 11y ago
> It seems they are taking the same route as cygwin by "mounting" windows drives in /mnt/c (or /cygdrive/c).
I wonder if this Unix filesystem layer will be able to break the Windows legacy path length limit. If so, the Linux version of Node.js will suddenly become much more useful than the Windows version.
> It remains to be seen if this is better (more performant) or worse
Sounds like performance, at least, will be better. TFA says "it's totally shit hot! The sysbench utility is showing nearly equivalent cpu, memory, and io performance." I'll reserve judgment until I see the fork() benchmarks. :)
- drinchev 11y agoJust a remark. npm's team fixed long paths in v3.0, so now you have "flat tree".
- mmebane 11y agoThe "maximally flat" package structure in npm 3 solves the problem in most common cases, so I suppose "much more useful" was an exaggeration - if you keep your code in a relatively short base directory such as C:\src\nodeprojects\left-pad-ng\, you'll probably be fine. Depending on what version ranges dependencies are locked to, you could still end up with a pathological situation which breaks the path length limit, but I've only had that happen once since switching to npm 3, and it was easy to resolve.
- bpye 11y agohttp://stackoverflow.com/a/67293/3965517 http://stackoverflow.com/a/67293/3965517 indicates that NT does support fork properly, just not exposed to usermode normally.
- pcwalton 11y agofork() is exposed to user mode, but it's an undocumented private API. Pass the handle of the parent process as the 4th parameter and TRUE as the 5th parameter to NtCreateProcess: http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FProcess%2FNtCreateProcess.html http://undocumented.ntinternals.net/index.html?page=UserMode... The problem is that the Win32 user mode system will fight you every step of the way: CSRSS will not understand what you just did, for example. It's not generally worth it.
- SNvD7vEJ 11y agoSo, max path length in Linux user space will be about 215 chars? (for it to be accessible from Windows user space) MAX_PATH in Windows = 260 Path to Linux file system root from Windows user space: "C:\Users\<user>\AppData\Local\Lxss\rootfs\" - about 45 chars Max depth reachable from Windows user space = 260 - 45 = 215
- to3m 11y agoThe NTFS limit is 32768 wchars, though the standard Win32 API doesn't really expose it very well... fingers crossed they used it!
- ape4 11y agoIts details like this that will make or break this.
- NateDad 11y agoI'm pretty sure I saw something in one of the articles that mentions they explicitly use the extended \\?\ form of paths, which gets around the 255 character path limit.
- NateDad 11y agoJust to verify, watched a video that explicitly said that it does get around the path limit (though if you then go look at those files in explorer, explorer "has problems" whatever that means).... but that's just because explorer still uses the legacy APIs that do have a path limit.
- wvenable 11y agoWell the very first thing I'd do is symlink/junction point that to something like C:\Users\<User>\Linux or even C:\Linux if I feel particularly single-user.
- batat 11y agoKinda bad news for node.js developers /home/user/dev/my-proj/node_modules/concurrently/node_modules/chalk/node_modules/has-ansi/node_modules/ansi-regex