• Welcome to Valhalla Legends Archive.
 

Windows Forms Memory Consumption

Started by MyndFyre, July 21, 2004, 06:21 PM

Previous topic - Next topic

MyndFyre

I've become very conscious about how much memory my bot uses (about 40mb by the time the bot loads).

I decided to do some testing:

Baseline (one window, no child controls):
      13,984k debug, 13,680k release

Baseline plus use of my library:
      14,336k debug, 14,200k release

Baseline console:
      6,580k debug, 6,356k release
Console plus use of my library:
      7,176k debug, 7,004k release

The "Baseline" test is an unmodified, brand-new C# project with a single, blank form called "Form1".  Adding my library to it, I added a class which implemented the interface IConnectionSettings, which forced the runtime to load my library.

The "Baseline console" test was a brand-new console application.  When I added my library to it, I implemented the IConnectionSettings interface on Class1, where the entry point was.

Somewhat scary....
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Banana fanna fo fanna

Wow, that's really bad. Can you do the same benchmark on a native API Windows app, and MFC?

Maddox

My native C++ bot runs under 300K when idle sometimes.
asdf.

hismajesty

Since iago is off camping..."JavaOp takes 600k"

iago

As long as I'm not using a gui, I've seen my Java bot as low as 300k and as high as 1.2mb, but it tends to level off at about 600k :D
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Falcon[anti-yL]

The lowest I got with Armabot was 13mb after leaving it on for a day, then soared all the way to 80mb when I used the log viewer :-\

MyndFyre

Quote from: Falcon[anti-yL] on July 30, 2004, 01:49 AM
The lowest I got with Armabot was 13mb after leaving it on for a day, then soared all the way to 80mb when I used the log viewer :-\

Is that all?  I've had well over 100mb when using the log viewer.  :-P
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Falcon[anti-yL]

The log viewer took so long to view so instead of watching its memory usage increase I just ended the process. I had TFT minimized so all that memory consumption lags up my sister :( I'm sure If I had left it on it would've went over 100mb ;)

Banana fanna fo fanna


TheMinistered

Hey, myndfyre-- what project configuration were those tests done on?  If you set the configuration to Release, you will get better memory consumption, it's still bad-- but it's better.

Banana fanna fo fanna


MyndFyre

Quote from: TheMinistered on August 03, 2004, 09:14 AM
Hey, myndfyre-- what project configuration were those tests done on?  If you set the configuration to Release, you will get better memory consumption, it's still bad-- but it's better.

Emphasis added for people who can't read:

Quote from: Myndfyre on July 21, 2004, 06:21 PM
Baseline (one window, no child controls):
     13,984k debug, 13,680k release
Baseline plus use of my library:
     14,336k debug, 14,200k release
Baseline console:
     6,580k debug, 6,356k release
Console plus use of my library:
     7,176k debug, 7,004k release
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

MyndFyre

Quote from: $t0rm on August 03, 2004, 10:23 AM
40mb is still unacceptible.

Agreed.  However, I think all things considered, 15mb is not.  I am limited by the technology I am using; if its baseline is 14mb, then my goal is 15-18mb.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Tuberload

Yes, and it sounds like this technology is not so great right this moment.
Quote"Pray not for lighter burdens, but for stronger backs." -- Teddy Roosevelt
"Your forefathers have given you freedom, so good luck, see you around, hope you make it" -- Unknown

TheMinistered

A base-line window uses ~6mb and base-line console uses ~5mb for me, perhaps your tests are faulty.