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

memory usage

Started by compuluke, October 21, 2005, 11:57:24 PM

Previous topic - Next topic

compuluke

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

rickg22

Yikes! :shock: Sounds like a big memory leak in there! I haven't tried that feature yet.

Yiannis, any ideas?

thomas

#2
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 ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Ceniza

Quote from: Private Bytes Historyno idea what *that* is

It could be the CodeCompletion plugin.

thomas

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

I'll try the same memory/cpu test.  Which graphical system monitor is that?

takeshimiya

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.

thomas

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