glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] Re: Memory Consumption ~Alpha 21 release


From: Joe Wells
Subject: Re: [glob2-devel] Re: Memory Consumption ~Alpha 21 release
Date: Sat, 14 Jul 2007 03:00:51 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Bradley Arsenault" <address@hidden> writes:

> On 7/13/07, Bradley Arsenault <address@hidden> wrote:
>
>     After looking at a profile, and it suddenly occurred to me what the 
> problem
>     may be for the excessive memory consumption, and yes, it would be my 
> fault.
>
>     Do you know the overlay areas? In the graph screen when playing the game,
>     you can select to draw overlay areas, which can show you where your 
> defense
>     is best, or the highest concentrations of starving or damaged units,
>     usefull to know where to place hospitals or inns.
>
>     Well, I made the mistake of storing one for every statistic frame, and
>     there are 128 of them. As soon as the game initiates, it fills 3 * 128
>     vectors with width*height integers, and thats huge memory.

By the way, I've observed the problem when merely loading a map in the
map editor.  Does the problem you mention explain that?

>     Provided sizeof
>     (int) is 3 (24 bits), the total usage (per team) is 18 mb on a 128x128 
> map,
>     and 288 mb on a 512x512 map, which explains the problem.

I've seen excess memory usage of what seems to be about 3 or 4 times
that much.  Could there be another problem as well?

>     I feel rather near
>     sited not to have seen this when I made the feature last year.
>
>     I'm making the correction in the master, to only compute for the current
>     frame, only for the local team, only for one vector at a time, and using
>     Uint16 to limit the size of the integer, since this is all thats required.
>     No memory is waisted.
>
> I have commit the fix to the master branch (and merged into the
> gamegui_rewrite_2007 branch). The game runs noticably faster now, and with 
> less
> memory.

Excellent news!  I'm glad to hear something has been done about this
problem.

-- 
Joe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]