News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Code::Blocks scans filesystem on file open

Started by ohsnap, April 04, 2018, 06:08:40 PM

Previous topic - Next topic

ohsnap

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?

oBFusCATed

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!]

ohsnap

Quote from: 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?

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.

stahta01

#3
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.

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

ohsnap

Quote from: 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.

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

oBFusCATed

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!]

ollydbg

Quote from: ohsnap on April 04, 2018, 11:15:16 PM
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

#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.

ohsnap

Quote from: ollydbg on April 05, 2018, 09:31:14 AM
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.