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

Answered

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

 

3
13 comments

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

-3
Avatar
Permanently deleted user

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. 

5
Avatar
Permanently deleted user

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

0

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

0
Avatar
Permanently deleted user

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

0

Hello everyone!

Please capture a CPU snapshot while reproducing the issue and send it to clion-support at jetbrains.com 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?
-3
Avatar
Permanently deleted user

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.

1
Avatar
Permanently deleted user

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.

0

Hi @FrancoisB!

In remote mode all operations (including IO operations) have additional "remote" overhead so slowness is expected in comparison to local usage. https://intellij-support.jetbrains.com/hc/en-us/articles/206544869-Configuring-JVM-options-and-platform-properties 

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?

0
Avatar
Permanently deleted user

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.

 

3

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, bigger.font.in.project.view=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

 

2

I'm holding the fresh new CLion but have the same issue. The refreshing operation in WSL folder takes soooo long and it runs everytime after build! Building takes only a few seconds in VSCode but almost 1 min in CLion. Now my workaround is to edit codes in CLion and build&run in VSCode (or use scripts). It's really a pain in the a** and I hope it gets solved as soon as possible. Here is my CLion version:

CLion 2023.2.1
Build #CL-232.9559.58, built on August 23, 2023
Licensed to Huawei Technologies Co., Ltd.
Expiration date: September 7, 2023
Runtime version: 17.0.8+7-b1000.8 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 16
Registry:
   run.processes.with.pty=TRUE
   ide.experimental.ui=true
   debugger.attach.dialog.enabled=true

Non-Bundled Plugins:
   cn.haojiyou.CodeGlance3 (2.1.1-2021.1.3)
   idea.plugin.protoeditor (232.9559.10)
   org.jetbrains.toolbox-enterprise-client (10000.0.13-ij212)
   com.markskelton.one-dark-theme (5.8.0)
   com.huawei.intellij.plugin.foundation (1.12.2)
   Statistic (4.2.7)
   com.huawei.cloud.hicode.marketplace (1.0.12)
   PlantUML integration (5.23.0)
   izhangzhihao.rainbow.brackets (6.21)
   com.huawei.cloud.hicode.codecheck2 (3.4.6)
 

0

@Chan please capture a CPU snapshot and send it to clion-support at jetbrains.com, so that we could look at the specific problem.

0

Please sign in to leave a comment.