Author Topic: memory usage  (Read 6024 times)

compuluke

  • Guest
memory usage
« on: October 21, 2005, 11:57:24 pm »
Hello.  New to code::blocks.  Kickass so far though.

However, one (big) problem.  When I "add files recursively" to a new project, my 2 gigs of physical memory fills up and renders my machine inoperable.  I even "niced" it.

Anyone else have this?  I've cleaned the project before hand, so it's just parsing text and not binaries.

L

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: memory usage
« Reply #1 on: October 22, 2005, 12:14:13 am »
Yikes! :shock: Sounds like a big memory leak in there! I haven't tried that feature yet.

Yiannis, any ideas?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: memory usage
« Reply #2 on: October 22, 2005, 01:36:33 am »
Just tried to reproduce that using RC1-1, added 876 files recursively:



Well, it takes stunning amounts of CPU (clearly there is room for improvement in that matter), but I was not able to reproduce the memory issue. Memory was never more than 22.5 MB in this experiment.

EDIT:
If you wonder why CPU and memory do not correlate tightly, this is my fault. I took two screenshots for the two graphs (while time passed on). The lower graph thus needs to be shifted a bit to the right ;)
« Last Edit: October 22, 2005, 01:41:24 am by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: memory usage
« Reply #3 on: October 22, 2005, 03:07:14 am »
Quote from: Private Bytes History
no idea what *that* is

It could be the CodeCompletion plugin.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: memory usage
« Reply #4 on: October 22, 2005, 01:35:41 pm »
Right, that explains why it is 100% user time from that point, too.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

compuluke

  • Guest
Re: memory usage
« Reply #5 on: October 24, 2005, 05:05:37 pm »
I'll try the same memory/cpu test.  Which graphical system monitor is that?

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: memory usage
« Reply #6 on: October 24, 2005, 06:33:48 pm »
Probably it is Process Explorer from Sysinternals.

For sure, it provides less info than profiling, but lot of more info than Windows Task Manager :P
It's an utility that goes in the must-have programmer tools I think.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: memory usage
« Reply #7 on: October 24, 2005, 08:54:50 pm »
Yep, this is Process Explorer. You will of obviously have to use a different tool on Linux, since Process Explorer is Windows only (gtop will probably do just fine).

There is no heavy GUI stuff going on during the loading of a project, merely a list of filenames (wxArrayString) is looked at one by one and added to a linked list (or several lists). Since this is the very same code on Linux and Windows, I dared to make that comparison. If wxArrayString and wxList leak memory on Linux (or the subroutine that calls them does), they leak on Windows, too.
Obviously, you could not assume the same if we were talking about some heavy widget drawing stuff ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."