[Bf-committers] Python + Many Objects = slow!
Stephen Swaney
bf-committers@blender.org
Mon, 03 May 2004 20:52:18 -0500
Chris Want wrote:
>
[info on profiling snipped ]
Hot Doggies! Someone used actual profiling data rather
than guessing at nano-optimizations in the code. Verrrry
interesting.
GetObjectByName() chases down the list of objects in
G.main->object. Linear search thru a list, blah, blah, blah.
Sounds like time for a data structure!
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. Like most problems, this
is likely to be more complicated than it appears, but I have no
doubt we can make this better.
Mega Thanks, Chris for the useful info. And a fascinating problem.
Stephen
--
Stephen Swaney
sswaney@swbell.net