[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58855] trunk/blender/source/blender: fix for [#36260] 2, 300 Objects Makes Blender Unresponsive

S A lockalsash at gmail.com
Sat Aug 3 17:20:55 CEST 2013


Hi,
BLI_mempool_as_arrayN can not be implemented via BLI_mempool_as_array call.

BLI_mempool_as_array per description fills an "array of pointers", and
BLI_mempool_as_arrayN per description should allocate and fill an
"array". But what it did was completely wrong: it allocated enough
memory to fill the array of elements, but then it implicitly casted
void* to void** and filled only the small part of allocated memory
with pointers (addresses). Previously BLI_mempool_as_arrayN was
unused, so I decided to fix it (actually I had no way but to fix it,
because it would break outliner data while saving).

The reason why this change was not included in the patch on
codereview.appspot.com is that BLI_mempool_as_arrayN was not called in
the original patch as you remember.

On Sat, Aug 3, 2013 at 5:07 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
> Whats the purpose of changes to BLI_mempool_as_arrayN?
> I don't recall this from the patch I checked.
>
> On Sat, Aug 3, 2013 at 9:35 PM, Sv. Lockal <lockalsash at gmail.com> wrote:
>> Revision: 58855
>>           http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58855
>> Author:   lockal
>> Date:     2013-08-03 11:35:09 +0000 (Sat, 03 Aug 2013)
>> Log Message:
>> -----------
>> fix for [#36260] 2,300 Objects Makes Blender Unresponsive
>>
>> - performance of outliner was low because of unoptimal data structures.
>> - now it uses BLI_mempool instead of custom mempool and GHash to make searches for duplicates faster.
>> - also fix undesired behaviour of BLI_mempool_as_arrayN
>>
>> thanks to Campbell Barton and Lukas T?\195?\182nne for helping me get a better fix put together.
>>
>> Modified Paths:
>> --------------
>>     trunk/blender/source/blender/blenkernel/intern/object.c
>>     trunk/blender/source/blender/blenlib/intern/BLI_mempool.c
>>     trunk/blender/source/blender/blenloader/intern/readfile.c
>>     trunk/blender/source/blender/blenloader/intern/writefile.c
>>     trunk/blender/source/blender/editors/space_outliner/outliner_draw.c
>>     trunk/blender/source/blender/editors/space_outliner/outliner_edit.c
>>     trunk/blender/source/blender/editors/space_outliner/outliner_intern.h
>>     trunk/blender/source/blender/editors/space_outliner/outliner_select.c
>>     trunk/blender/source/blender/editors/space_outliner/outliner_tools.c
>>     trunk/blender/source/blender/editors/space_outliner/outliner_tree.c
>>     trunk/blender/source/blender/editors/space_outliner/space_outliner.c
>>     trunk/blender/source/blender/makesdna/DNA_outliner_types.h
>>     trunk/blender/source/blender/makesdna/DNA_space_types.h
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers


More information about the Bf-committers mailing list