[Bf-committers] Python + Many Objects = slow!
Stephen Swaney
bf-committers@blender.org
Mon, 03 May 2004 21:36:05 -0500
Daniel Dunbar wrote:
>
This just gets more and more interesting!.
>
> Note that:
> object = GetObjectByName(GetIdName(id))
> is equivalent to
> object = id
>
> Although, the second one is a tad bit faster.
> (Ok, they aren't exactly equivalent, but under
> the only constraints that this function is called
> I think they are).
Question: Under what circumstances would these
not be equivalent?
> I don't know if I want to know the explanation behind
> this code. I might only note that naming inconspicuous
> functions to hide their O(N) behavior is a bad practice.
> GetObjectByName should really be called,
> DoAnObscenelyLongSearchInContrastToWhatShouldReallyBeNecessaryToFindAnObjectByName.
>
Personally, I don't think the issue is naming conventions,
but rather a lack of a high level view of blender internals.
--
Stephen Swaney
sswaney@swbell.net