Author Topic: CPU Usage  (Read 2682 times)

Offline Shen

  • Bot Destroyer
  • ***
  • Posts: 111
    • View Profile
CPU Usage
« on: June 01, 2005, 11:15:47 AM »
Just a minor request. Would it be possible to limit the amount of CPU time DB uses? With the new stealth mode (like it!) and the fact that long running evo sims tend to completely disable my comp for other uses, the ability to set DB to only use a set amount of CPU time would be mega useful so I can 'Sim and Forget' so to speak.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
CPU Usage
« Reply #1 on: June 01, 2005, 11:23:11 AM »
That's the direction I'm trying to move in.  One major issue is the amount of RAM DB takes up.

If that's not a problem, I just have to sprinkle commands all over the place that give control back to windows to handle other programs.

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
CPU Usage
« Reply #2 on: June 01, 2005, 09:54:51 PM »
Why does DB take up so much Rom anyways? All the other games I have (store bought memory monstrocities) don't even come close.

It seems just a bit strange that a "tiny" Alife sim can beat out all the others.
 :lol:

Endy B)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
CPU Usage
« Reply #3 on: June 01, 2005, 10:13:23 PM »
I'm not entirely sure.  All the robots together can't be much more than a meg or so.  The env grid has a prototype in the code, which takes up maybe a 20 megs.  Forms and stuff probably take up some space.

Beyond that I'm not sure.  Probably a memory leak somewhere (I know that the sim never resizes the shots array.  I did that on purpose to help speed up things, but when you restart a sim it might not be a bad idea.)

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2554
    • View Profile
    • http://kuro-tejina.com
CPU Usage
« Reply #4 on: June 01, 2005, 10:30:45 PM »
The arrays!

2000 robots, each with about 100 attributes, a 20 position stack array, a 20 position mutation array and a 200 position DNA array

That is 2000 X 340 = 680,000 data points, most of which are singles or integers.

Then there is the e-grid at 120 X 90 X 10

That is a lot of memory
There are 10 kinds of people in the world

Those who understand binary.

and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
CPU Usage
« Reply #5 on: June 01, 2005, 10:39:08 PM »
But 680 000 data points, even at like 10 bytes a piece (a liberal estimate to be sure) is still only 5 Megs of data.  Which is quite paltry in most systems (I have 500 megs of ram on my system).

Env Grid is again a few megabytes.  Still not the massive amounts of RAM that the program takes up.

I'll look into it when I have a chance.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7715
    • View Profile
CPU Usage
« Reply #6 on: June 04, 2005, 06:24:02 AM »
Found this link for how to implement different CPU priority levels.

Chaning Priority.

We just need a button (probably the staelth one works just fine) to put the program in idle mode, and then put it back to normal (or even higher, like realtime if we like) once the program is remaximized.