[DGD] Extremely large nested structures

Felix A. Croes felix at dworkin.nl
Thu Jul 2 01:24:20 CEST 1998


Ling <K.L.Lo-94 at student.lboro.ac.uk> wrote:

> Evening everyone,
>
> I've been looking at using octrees to implement a 3D mechanism.  What this
> means is that I'll need some sort of large nested structure with 8
> elements, within each element may be another 8 elements.
>
> So... would it be idiotic to have bookkeeping objects that contain one
> octree with a depth of roughly 11+?  Note that octrees can and will be
> sparse so it wouldn't always take up 1024*1024*1024 elements.  Is this bad
> for the driver?  Affects on swapping?  I'm hoping arrays are shared within
> an object so can pass the array around within without any adverse
> affects...

What matters is not the amount of nesting, but the total number of
elements in all arrays and mappings in the object.  On most platforms,
each element takes up 8 bytes.  Swapping delays will vary depending on
CPU speed, disk speed and operating system.  Note that it is possible
to disable swapping altogether by specifying `swap_fragment = 0;' and
`static_chunk = 0;' in the config file.

Arrays are indeed shared.  They are shared between objects for as
long as the current LPC thread is running, and will be made unique in
each object as soon as it has finished.

Regards,
Dworkin



More information about the DGD mailing list