[Bf-committers] Faster listbase lookups

Ton Roosendaal ton at blender.org
Mon Oct 23 16:08:28 CEST 2006


Jiri has an old proposal in wiki for how to make a hybrid list with an  
array. Code that turns lists temporally in arrays and then does a  
binary search would speed up functions a lot.

And yes, all Library data is supposed to be sorted alphanumeric. There  
seems to be a bug somewhere that breaks this, which has to be located  
first. Also note that this sorting is per Library (if linked data is in  

However, I wouldn't expect too much yet of quick and easy solutions.  
The real slowdown is also because of a lack of structure in many  
database related calls. There is duplicate code for it all over, like  
in the 'expand' code for readfile.c, the 'make local' code in kernel  
and in editobject.c. This was a historical process really... and  
something that could be tackled all at once. In the blenkernel a couple  
of generic calls should be created that can traverse all dependencies  
in Library data efficiently. That's not very easy, but definitely the  
ultimate solution.


On 22 Oct, 2006, at 18:44, Campbell Barton wrote:

> Dosnt blender have its own hash table ghash? - its used for edge split  
> and some editmode functions AFAIK
> Ed Halley wrote:
>> On Oct 22, 2006, at 8:26 AM, Mathias Panzenböck wrote:
>>> Well, Python has a hash-table. Would it be somehow possible to reuse  
>>> this work and not to invite the weel once again?
>> Not directly, as nothing in the core depends on python or c++, and  
>> the listbases are about as core as you can get.
>> Making this sort of thing is not difficult, it's just a bit of work  
>> to ensure that it is solid and bug-free.
>> --  
>> [ e d @ h a l l e y . c c ]
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at projects.blender.org
>> http://projects.blender.org/mailman/listinfo/bf-committers
> --  
> Campbell J Barton
> 133 Hope Street
> Geelong West, Victoria 3218 Australia
> URL:    http://www.metavr.com
> e-mail: cbarton at metavr.com
> phone: AU (03) 5229 0241
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
Ton Roosendaal  Blender Foundation ton at blender.org  

More information about the Bf-committers mailing list