Author Topic: Code::Blocks scans filesystem on file open  (Read 4823 times)

Offline ohsnap

  • Single posting newcomer
  • *
  • Posts: 4
Code::Blocks scans filesystem on file open
« on: April 04, 2018, 06:08:40 pm »
It has always been the case that the code::blocks process would begin to scan my entire filesystem every time i open a file in it. This process would use 100% disk usage for around 5 minutes in which my system is unusable. I use procmon to make sure that it is indeed the case. Never understood why. Anybody has any idea on what could cause this behavior?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks scans filesystem on file open
« Reply #1 on: April 04, 2018, 08:51:40 pm »
What file do you open?
Can you reproduce this with a simple file without any includes in it?
Do you have a project opened?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ohsnap

  • Single posting newcomer
  • *
  • Posts: 4
Re: Code::Blocks scans filesystem on file open
« Reply #2 on: April 04, 2018, 09:52:33 pm »
What file do you open?
Can you reproduce this with a simple file without any includes in it?
Do you have a project opened?

Hi, thanks for replying.
I can reproduce it when i open .h and .c files both empty and non-empty but not with .txt files. No projects open.
This is the setup:
- windows 7 64bit
- in my \Desktop i have the folder containing the nosetup codeblocks 17.12mingw version
- create an empty .c file in the \Desktop near that folder
- open Process Monitor aka procmon
- fire up codeblocks by clicking its executable in that folder
- from CB open the above .c file. Both drag&drop and "open..." will do.
- witness procmon being flooded with filesystem activity as CB scans \Desktop and all its subfolders recursively
I have quite a bit of big folders in my desktop, mostly backups.
Because CB appears to only search inside \desktop i suspect that the logic is that CB will scan the subfolders starting from the folder in which the .c file resides.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Code::Blocks scans filesystem on file open
« Reply #3 on: April 04, 2018, 10:22:46 pm »
Sounds like it could be code-completion related.
Can you turn off the code-completion plugin and see if the file activity goes away after doing that.
That way the CB Devs only needs to work on code checks in code-completion plugin or skip looking at that possible cause.

Edit: Most of current active devs are [primarily] Linux devs.

Tim S.

« Last Edit: April 04, 2018, 11:01:58 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ohsnap

  • Single posting newcomer
  • *
  • Posts: 4
Re: Code::Blocks scans filesystem on file open
« Reply #4 on: April 04, 2018, 11:15:16 pm »
Sounds like it could be code-completion related.
Can you turn off the code-completion plugin and see if the file activity goes away after doing that.
That way the CB Devs only needs to work on code checks in code-completion plugin or skip looking at that possible cause.

Edit: Most of current active devs are [primarily] Linux devs.

Tim S.

Turning off code completion unser settings->editor... and restarting did not make a difference :(

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Code::Blocks scans filesystem on file open
« Reply #5 on: April 05, 2018, 12:31:54 am »
What other plugins do you have enabled?
Can you gather a backtrace somehow?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5913
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Code::Blocks scans filesystem on file open
« Reply #6 on: April 05, 2018, 09:31:14 am »
Turning off code completion unser settings->editor... and restarting did not make a difference :(
This is not the correct way you "disable" the Code Completion plugin.

The correct way is: Menu->Plugins->Manage plugins.

Code Completion plugin has an option to scan the folders for files, which will prompts when you enter the
Code
#include " <--------------------------prompt files here

You can disable this option in the "Enable header code completion" in Menu->Settings->Editor->CodeCompletion setting dialog.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ohsnap

  • Single posting newcomer
  • *
  • Posts: 4
Re: Code::Blocks scans filesystem on file open
« Reply #7 on: April 05, 2018, 03:03:59 pm »
The correct way is: Menu->Plugins->Manage plugins.

Disabling the plugin manually solved the problem, good call! Could not to find any other combination of settings that would do it. Thanks everybody for the prompt response.