Author Topic: Abnormal lags/freezes when editing some header files in large project  (Read 3565 times)

Offline RenierVR

  • Single posting newcomer
  • *
  • Posts: 3
Hi

I am working with a fairly large C project (around 110 files included). For some reason, in the last week, Code::Blocks has been exhibit very strange behaviour when opening and trying to edit some of the header files. Every few seconds C::B freezes, which also lasts for a few seconds. Apart from this, the whole program is slow to respond and frequently lags when typing or closing/switching files. The size of the project did not grow significantly recently, and neither did I change anything relating to C::B (such as installing updates or add-ons).

This does not happen at all when editing source files. It doesn't even happen on most header files, only ones that generally seem to be included by a lot of other files in the project.

Are there any settings or automatic linking, or something similar that might be causing these freezes? I've tried to look around but cannot see anything or find anyone with a similar problem in the forums. Any help would be greatly appreciated!

Thanks in advance.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
What OS and C::B version are you using?
(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 RenierVR

  • Single posting newcomer
  • *
  • Posts: 3
I am running Windows 10 Pro and C::B 16.01.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
I suggest turning off the Code Completion plugin; that is the likely cause of the issue.

Devs: Is there any hot keys method to enable and disable Code Completion?
If the OP problem is tied to Code Completion, a fast way to turn it on and off would be good.

Tim S.
 
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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Devs: Is there any hot keys method to enable and disable Code Completion?
If the OP problem is tied to Code Completion, a fast way to turn it on and off would be good.
No there aren't. And it won't help, because the cc would need to keep track of changes or do a full reparse...
(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 oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
RenierVR: Please test with CC disabled and also test a night build...
(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 RenierVR

  • Single posting newcomer
  • *
  • Posts: 3
So it turns out the Code Completion plugin was the culprit. Turning it off appears to completely solve the freezing/lagging problem. I tried a fresh C:B install, but the CC plugin still gives problems. Would a nightly build possibly provide me with an updated/improved CC plugin version?

Online Commaster

  • Almost regular
  • **
  • Posts: 171
Sadly, no. The current Code Completion plugin was developed for wx2.8 and already did some terrible things(like calling UI functions from a secondary thread). With the arrival of wx3.0 this boiled to the surface.

Currently, a lot of effort is going into developing an alternative: http://forums.codeblocks.org/index.php/board,18.0.html