Refreshing files... takes way tool long often before building.


Quite often before build CLion is getting stuck in Refreshing files state. The build itself works normally after that. 


CLion 2017.3.1
Build #CL-173.4127.32, built on December 26, 2017
JRE: 1.8.0_152-release-1024-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.1


Comment actions Permalink

@Andrey could you please try CLion 2017.3.3 and CLion 2018.1 EAP? Is the same behavior observed with them?

Comment actions Permalink

I am running 2018 latest release from April 10 (on RedHat Linux 6.8) and this happens all the time. The problem is that :

1) Refreshing files takes much too long to the point where you can't do anything else but wait. 

2) Runs every single time when building or debugging even though nothing has changed. If I just press "debug", if will always run first before doing a build. This makes debugging and building very counter productive and slow. 

This feature should be fixed or removed completely. I makes CLion very hard to use properly. 

Comment actions Permalink

The same for me on Debian Stretch, 2018.1 EAP, built on 18 April.

Comment actions Permalink

Same here, 2018.1.1.
Sometimes it does this for 30mins

Comment actions Permalink

2017.3.3 same thing here, pretty sad it's not adressed by anybody for such a long time, makes me consider leaving CLion completely, because waiting half an hour for run after even no changes at all is total crap

Comment actions Permalink

Hello everyone!

Please capture a CPU snapshot while reproducing the issue and send it to clion-support at so we can take a look at what is going on. Also please answer the following questions:

  • Do you have network sources in your source tree?
  • Does File | Invalidate Caches and Restart help?
  • What Header search path are specified in your project?
Comment actions Permalink

I managed to significantly reduce the time of refreshing by removing all output and non-code folders from the project directory. However, these were marked as excluded, so either this has no effect or it doesnt work.  I'll go through the suggested steps anyway, thanks.

Comment actions Permalink

I am using CLion on a Windows 10 desktop and an Ubuntu 18.04 LTS VirtualBox VM using exactly the same directories - Refreshing files takes MUCH MUCH longer on the Ubuntu instance to the point where it is incredibly frustrating to use.

I've been using CLion on Windows with WSL up to this point, but now my C/C++ application has linux kernel dependencies not implemented in WSL which has forced me to try the following:
1) Ubuntu VM
Remote Host Toolchain with ssh to:
2) Ubuntu VM
3) Docker Host

All 3 of the above are just so much slower than using WSL for different reasons making it very frustrating. Slow "Refreshing files" in option 1 is the primary issue, whilst continuous rsync with each build in options 2 and 3 is also too slow to be used as a primary development setup. If a Docker Host Toolchain leveraging a locally shared directory could be implemented it would be ideal, but fixing the stupidly slow "Refreshing files" on CLion Ubuntu is obviously a natural solution too.

Comment actions Permalink

Hi @FrancoisB!

In remote mode all operations (including IO operations) have additional "remote" overhead so slowness is expected in comparison to local usage. 

The situation with usage of CLion locally on Ubuntu VM is a bit strange. Do you use the same CLion versions on Windows and on Ubuntu? Have you ever changed the  Xmx JVM option according to this guide? Maybe the Ubuntu VM is much less powerful than your Windows desktop?

Comment actions Permalink

I came to this post because I was having problems with slow refreshing files in between builds and runs. I found that the following improved the situation for me:

(1) I had large directories containing many files in the project path not related to the source code/build. I set these to excluded (by right clicking on the directory in the project view and "Mark Directory As"->"Excluded". Doing this did not immediately fix the problem on its own.

(2) After doing this I did "File" -> "Invalidate Caches and Restart" as suggested above. Now it runs much faster.


Comment actions Permalink

I also have this problem, running CLion on Windows 10 64-bit.

Single CMakeLists.txt and (more importantly) single source-file.

"Refreshing files..." takes around 20-30 seconds, for every build where I modified my single source file.

"Invalidate caches / Restart" doesn't work.

I have tested building with configurations for MinGW, WSL and VS2019, with about the same results for each.

If I run CLion from inside WSL itself, using an X server on Windows, then this "Refreshing files..." is immediate. It's also immediate when I run in a native Linux environment.


Clion "about" for all tests:

CLion 2019.3
Build #CL-193.5233.103, built on November 27, 2019
Licensed to Joachim Pileborg
Subscription is active until December 11, 2019
Runtime version: 11.0.4+10-b520.11 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1987M
Cores: 4
Registry: run.processes.with.pty=TRUE,, cidr.max.intellisense.file.length=1000000
Non-Bundled Plugins: BashSupport, Dart, Jetbrains TeamCity Plugin, Scratch, by.vkatz.decorate_mode_switcher, com.atlassian.bitbucket.references, com.jetbrains.plugins.ini4idea, com.paperetto.dash, com.ppolivka.gitlabprojects, de.wieselbau.clion.clangtidy, mobi.hsz.idea.gitignore, name.kropp.intellij.makefile, name.kropp.intellij.qml, net.vektah.codeglance, org.editorconfig.editorconfigjetbrains, org.jetbrains.plugins.localization, org.root.GoogleIt



Please sign in to leave a comment.