[Bf-committers] Python + Many Objects = slow!

Willian Padovani Germano bf-committers@blender.org
Mon, 3 May 2004 23:39:12 -0300


Hi,

Ton: better wait a little before 2.33a ...

----- Original Message -----
From: "Stephen Swaney" <sswaney@swbell.net>
To: <bf-committers@blender.org>
Sent: Monday, May 03, 2004 10:52 PM
Subject: Re: [Bf-committers] Python + Many Objects = slow!

> Just making up stuff of the top of my head, we could stuff
> the names in a dictionary ( aka hash table ) the first time
> thru and use that as a name cache.

Doesn't seem necessary, as Daniel gently pointed ; ), the id should be enough.
And as Chris wrote, this shouldn't be redone from scratch for every object and
not wasted with objects not linked to scripts.  Let's look at this well,
starting before the call to that function, wherever it happens, but we'll need
help to test the results, of course.

Another thing to improve: looking at that function I recall I messed with it to
add decref's for three PyDict items because of an old bug report about a memory
leak that was mentioned to be related to Python, but wasn't.  Later looking at
Python's source code I confirmed that it decref'ed itself discarded items (of
course), but forgot to remove the forced decrefs, will do.

--
Willian, wgermano@ig.com.br