On Oct 8, 9:36 am, Alex Holkner <[EMAIL PROTECTED]> wrote:
> On 08/10/2007, at 10:06 AM, Snor wrote:
>
>
>
> > Not sure if many people / anyone is actually using the layout module
> > for anything other than taking-a-peek, but I've found it extremely
> > useful just for rendering basic text. However it seems to use a fair
> > amount of memory doing it's thing - I'm okay with this, but it doesn't
> > give any of the memory back when you delete the obejcts you've
> > created. I'm assuming this is something to do with textures or
> > something else that is still stored after the objects are gone. I've
> > had a pretty good look through the code but I have trouble pinpointing
> > anything. Any ideas on this?
>
> What is "doing it's thing"? Is it using more memory (and not
> releasing) during rendering? During initial layout? After resizing?
>
> How are you measuring memory usage? Looking at top/ps/TaskManager/
> etc output is generally not informative, as virtual page allocations
> do not necessarily correspond to Python object usage.
>
> The layout module doesn't allocate any textures besides those used
> for font rendering (these will always persist -- glyphs are cached)
> and images in the HTML (these would probably be deleted when the
> relevant Layout objects are deleted, but I've not checked).
> Regardless, textures only significantly contribute to memory usage on
> the video card, and their system-memory footprint is small.
>
> Alex.
Sorry about being so vague -
I'm using Task Manager to monitor memory usage, I'm aware of the
innacuracies but from what I've seen from monitoring previous
applications (pygame/opengl), the current behaviour seems very
unusual.
The memory usage increases when resize is called and it appears a
little more when draw is called (but only the first time either of
these are called for each object), and stays the same when the Layout
object is deleted - that is, never goes down at all. If I create a
Layout object once and it uses 50KB, for example, then if I create the
same one and delete it in a loop 100 times, task manager indicates
that all 5,000KB of memory is still in use. This doesn't appear to be
released at any point no matter how long I run an application for.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---