Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: ohsnap on April 04, 2018, 06:08:40 pm

Title: Code::Blocks scans filesystem on file open
Post by: ohsnap 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?
Title: Re: Code::Blocks scans filesystem on file open
Post by: oBFusCATed 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?
Title: Re: Code::Blocks scans filesystem on file open
Post by: ohsnap 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.
Title: Re: Code::Blocks scans filesystem on file open
Post by: stahta01 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.

Title: Re: Code::Blocks scans filesystem on file open
Post by: ohsnap 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 :(
Title: Re: Code::Blocks scans filesystem on file open
Post by: oBFusCATed on April 05, 2018, 12:31:54 am
What other plugins do you have enabled?
Can you gather a backtrace somehow?
Title: Re: Code::Blocks scans filesystem on file open
Post by: ollydbg 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.
Title: Re: Code::Blocks scans filesystem on file open
Post by: ohsnap 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.