Author Topic: Max file size on C::B  (Read 4120 times)

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Max file size on C::B
« on: February 12, 2007, 03:09:54 pm »
Hi !

I tried to open a trace big file in C::B (=~ 7Mo).

CB consumes all cpu (99% in task manager).
As soon as it is quiet, each new event makes C::B consume 99% cpu again.

Is there a file size limitation ?
It it a bug ?

Dje

sethjackson

  • Guest
Re: Max file size on C::B
« Reply #1 on: February 12, 2007, 06:32:52 pm »
Just tried with a 13MB text file and C::B loaded it pretty fast. Now if I try a C++ file that big it takes longer..
What version are you using?

BTW did you mean 7MB or 70MB?
« Last Edit: February 12, 2007, 06:39:06 pm by sethjackson »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Max file size on C::B
« Reply #2 on: February 12, 2007, 07:12:37 pm »
It's probably CodeCompletion scanning the file.

sethjackson

  • Guest
Re: Max file size on C::B
« Reply #3 on: February 12, 2007, 09:35:20 pm »
It's probably CodeCompletion scanning the file.

Hmm that could be it. I always turn that off first....

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Max file size on C::B
« Reply #4 on: February 12, 2007, 09:56:33 pm »
Quote
BTW did you mean 7MB or 70MB?
It was a 7 MB trace file (ie non C++ file).
I think it can't be code completion because there is no parser for this kind of file.

But even if we admit this is code completion that parses an unknown format :
  • why does it monopolize cpu (99%) ?
  • why once we recover cpu, the first event (a kind of editor activation I think) makes C::B consume its released 99% ?

Quote
What version are you using?
SVN 3592

Dje
« Last Edit: February 12, 2007, 10:42:33 pm by dje »

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Max file size on C::B
« Reply #5 on: February 12, 2007, 11:52:12 pm »
I think it can't be code completion because there is no parser for this kind of file.

But even if we admit this is code completion that parses an unknown format :
  • why does it monopolize cpu (99%) ?
  • why once we recover cpu, the first event (a kind of editor activation I think) makes C::B consume its released 99% ?

The code-completion parser may indeed be the cause of the trouble here. Since quite some time now, it's not parsing files based on their extension (file type). It is parsing (or trying to) anything that is thrown at its way. This change was made to be able to parse the C++ headers, which have no extension (e.g. vector, map, iostream, etc).

I see two possible solutions to this:
1) make it an option (aka "the manual way")
2) parse only files (belonging to project) with known extensions (i.e. C/C++ files) but ignore this filter for #included files

I 'll have to think this thing a bit more but I see solution nr.2 is more correct...
« Last Edit: February 12, 2007, 11:53:52 pm by mandrav »
Be patient!
This bug will be fixed soon...