Simply disabling fsnotifier again doesn't fix the problem, CLion would keep nagging occasionally about conflicts with files that have changed both on disk and in memory. path/to/project/DISABLE_FSNOTIFIER and make the fsnotifier script pause itself (or behave differently) during the build until it sees for example the ENABLE_FSNOTIFIER file. Kill -SIGHUP $(cat /tmp/fsnotifier.pid) - continue all activityĪnother extension you may find useful would be to make the buildscript touch a file like, i.e. kill -SIGINT $(cat /tmp/fsnotifier.pid) - pause all activity Disabling will simply pause outputting all updates from the real fsnotifier (that is invoked via ssh). The fsnotifier script outputs it's process id to /tmp/fsnotifier.pid and hooks two signals, so you can enable/disable it with a signal. # Ignore some files that are not interesting to my IDEĭownload all source code from GitHub. Typeset file=$3 # i.e., /full/path/to/file Typeset cmd=$2 # i.e., DELETE/CREATE/CHANGE/. It now filters out intermediate files generated by the compiler (.o. Here I made the fsnotifier script-that was at first just a simple proxy (calling the real fsnotifier via ssh)-more intelligent. Solution, ignore as much (irrelevant) I/O as possible Perhaps when we're working with the project files on a local disk the IDE wouldn't hang, because simple I/O (even just checking file stats) doesn't have network overhead. Lot's of I/O is slow over network mountĭuring compiling I noticed my IDE would hang, the only cause could be that it's somehow flooded by the enourmous lines of input it now receives from fsnotifier. In my previous blog post we fixed fsnotifier such as in the previous image, but this also causes a new problem. But so far not in a C++ project where intermediate/build-files/libraries are first of all large and scattered throughout the project folder. In my opinion using file synchronization in these kinds of setups is too error prone and difficult to get right.Īs a side-note I've seen synchronization work moderately okay within a PHP project. I use an NFS mount ( sshfs would suffice as well) where I mount from the remote to local, not the other way around, or compiling will be extremely slow. However, nowadays I'm accustomed to the power IDE's can provide, primarily navigation-wise (jumping to classes, files, finding usages, etc.) and simply don't want to work without a proper IDE. I have worked remotely at a lot of companies, and usually I would simply use vim + a lot of plugins. That's why compiling happens on remote machines. Our build machines are extremely powerful, so it doesn't make sense to work on a local machine because of the build times. The debug build results in a 1.2 GiB executable, all intermediate files generated by the compiler/linker are many, and big.ĭuring build a lot of files are removed/(re)created/generated, so in general a lot of I/O happens. The project I'm working on is quite big, 10yr under development large codebase and a complex build process. That's why I'm sharing this in a blog post. It took me a while to get a setup that works reasonably well for me at work, for what I expect not a very uncommon setup. I use CLion in this blog post, but it should be the same for any of the other editors. Improve performance Jetbrains IDE when working on remote machine
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |