How to profit from WSL2
已回答
I am trying to use CLion for a huge C++ project (LLVM+friends). Up to now I have used WSL 1 as the toolchain and put the LLVM code into a Windows directory (e.g. C:\llvm-code). However, as the performance was poor I updated to WSL 2.
Although the setup in CLion works fine, I was wondering where to put the code now? If I leave the code in a Windows directory (e.g. C:\llvm-code), the compilation won't profit from the better WSL 2 I/O. If I put the code inside WSL 2 (e.g. /home/user/llvm-code) instead, CLion complains that the code is located in a remote filesystem and file watching etc might be slow.
What is your suggestion? Where am I supposed to put the code when developing with WSL 2.
请先登录再写评论。
I have the same question. For me, when using a Windows directory, Clion has been extremely slow to index and prepare IntelliSense autocompletion. This is a relatively small CMake project so I was very disappointed by its performance. Now I'm trying to use the Linux filesystem and see if it makes a difference.
Actually we recommend using the first version of WSL, because it's faster for now and it allows us to access WSL FileSystem directly, which is also faster than via P9. So:
- access to the windows files from WSL1 is faster than from WSL2
- access from Windows to the WSL1 file system is faster than to WSL2
- it seems that the processes launching is faster in WSL2 (but we don't know that for sure)
We suppose that it's better to store the code in the Windows file system.
Wow, Anna Falevskaya, the difference is night-and-day. Thank you so much, downgrading WSL to v1 solved all of my IntelliSense issues.
WSL 2 is a game-changer for me and I cannot go back to the previous version. Is there are a roadmap for better IntelliJ support regarding WSL 2?
Anna Falevskaya
Is it still the case that WSL1 still offers better performance compared to WSL2 for Clion ?
Sagar Ramsaransing now the performance is almost the same. Now in case of WSL1 we access WSL file system via P9 by default, so there are no differences on this point. But access to windows files from WSL1 is still faster than from WSL2.