blist icon indicating copy to clipboard operation
blist copied to clipboard

Dynamically allocate space in the root node.

Open DanielStutzbach opened this issue 15 years ago • 1 comments

Right now, small lists allocate enough space for LIMIT children, even if only one or two are actually needed. For small lists (where the root is a leaf), the memory footprint is terrible compared to an array-based list. The root needs to be able to dynamically choose the number of children. However, it needs to be very careful because hitherto a root node has been treated as a subclass of a regular node. With this change, routines cannot assume that any node has space for LIMIT children.

DanielStutzbach avatar Oct 12 '09 11:10 DanielStutzbach

I could use a union to give new meaning to unused fields (such as in the index extension area). For very small lists, some of the space in the "ext" area could be used to store items. I'm not sure if that's worth the effort, though.

DanielStutzbach avatar Nov 11 '09 23:11 DanielStutzbach