[Bf-committers] Faster listbase lookups

Ed Halley ed at halley.cc
Sun Oct 22 01:39:01 CEST 2006

Hrm, this sounds a lot like the complaints I raised in December of  
last year, in that the O(n) searches in lists was really getting  
unworkable at about n = 5000 ~ 6000.  I think the real solution is to  
find O(log n) searches where possible, even if this requires a  
heavier data structure.  Not all of the searches can be improved, but  
many searches seemed to be to find single things by name, which is a  
classic case where a hashtable (like Python dicts) wins.

On Oct 21, 2006, at 8:33 AM, Campbell Barton wrote:

> Hey Guys
> Iv been using scenes with a large number of objects recently, -  
> groups and scnene-sets has helped me bring object counts down from  
> 50,000 to about ~5000 per scene but even with 5000 objects, it can  
> still be noticeably slow to duplicate, parent and unparent objects.  
> - a few seconds.,
> My understanding of threads is limited, but I was thinking
> one thing that could improve performance on large ListBases is a  
> way to thread ListBase searches so 2 threads would search starting  
> at each end of the listBase and check up with (eachother every ~50  
> or so iterations to see if they have found the item thats being  
> searched for)
> Im not sure weather youd want this all the time, because it could  
> be slower for smaller listbases, but in that case it may be woth  
> the small slowdown....
> Talking to Emil, he thaught it would be possible.
> first Id like to know what others think, then if thats ok, if  
> anyone would like to do this (would be a paid job).
> - Cam
> -- 
> 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

[ e d @ h a l l e y . c c ]

More information about the Bf-committers mailing list