Page 1 of 1

Memory & CPU usage

Posted: Mon Jan 26, 2009 8:50 am
by JeebusSez
Hello!

I've been looking at Löve for a bit (love the umlat, I work at IKEA where umlats are abound) and I decided to download it to give it a try for development. However, loading the demos or even the no-game results in high CPU usage and high memory utilization.

I saw the CPU spike was a natural behavior for Löve; I can roll with CPU hogging.

However I have no idea why the huge memory spike; Task Manager says it spikes in the 300 000 K+ ranges. Running exhaustive demos such as lovalanche or WRATH (the zombie game using the Ënvy framework) slows the whole thing to a crawl. Although the simpler demos like hamsterball don't produce any significant slowdown, the memory usage is still radical.

My system specs at 2.8ghz Pentium 4 (I think I'm the last one with a single-core who tries to do memory and processor intensive things) and 1.5gb of RAM, so it's not a horrible system by any standard. Is this normal or have I done something horribly horribly wrong? I don't want to pick up a development for an engine that eats up resources like an army of angry cookiemonsters before I've even done anything :brows:

[edit] Also, sometimes when loading a game the program decides after a bit it's not worth it and simply displays the header and a thin sliver of a box.

Re: Memory & CPU usage

Posted: Mon Jan 26, 2009 8:59 am
by rude
Come again? 300000K? Peak memory usage of lovalanche on my computer: <14000K (SDL needs 10000K just to display the OpenGL frame).

EDIT: Yes, LÖVE takes all the CPU it can get. If you don't want that to happen, use love.timer.sleep().

Re: Memory & CPU usage

Posted: Mon Jan 26, 2009 9:04 am
by JeebusSez
This was just as Militia Defense froze.

Re: Memory & CPU usage

Posted: Mon Jan 26, 2009 9:08 am
by Kaze
:shock:
Did you build LOVE yourself?

Re: Memory & CPU usage

Posted: Mon Jan 26, 2009 9:09 am
by JeebusSez
Negative, I downloaded the windows installer. Should I?

Re: Memory & CPU usage

Posted: Mon Jan 26, 2009 9:15 am
by Kaze
JeebusSez wrote:Negative, I downloaded the windows installer. Should I?
:roll:
Highest I can get LOVE to use is 14.8mb of memory.

Re: Memory & CPU usage

Posted: Mon Jan 26, 2009 2:05 pm
by osgeld
one of my projects is sucking down about 36 mb, but its all accounted for

far as cpu usage, unless theres a call to sleep every x ms in the update function, yea it will use 100%, putting one there will drop it to < 20%

Re: Memory & CPU usage

Posted: Tue Jan 27, 2009 8:42 pm
by JeebusSez
I've installed Löve on my laptop and I don't get nearly as bad memory usage as I do on my desktop (~10,000K). The only thing I can think of is that there's something wrong with the way that my desktop is handling pagefile or something is messing up memory allocation; I will have to fiddle with it and come back to you results later (right now my desk is covered in ants).

Minor victory! :ultrahappy: