[svn-r8853] Purpose:

Code optimization

Description:
    Refactor B-tree code to extract all common information for a B-tree into a
shared structure that is pointed to by all the nodes in tree (instead of being
included in each node).

    Also re-order B-tree node comparison checks for chunked datasets to
check for >= the upper node first, since the comparison is a bit "heavy" and
this check is more likely to succeed when you are adding records to the
dataset.

Platforms tested:
    Solaris 2.7 (arabica)
    FreeBSD 4.10 (sleipnir) w/parallel
    Too minor to require h5committest
    (also, recent h5dump commits have broken testing...)
This commit is contained in:
Quincey Koziol
2004-07-09 21:28:06 -05:00
parent 6baa1ca5d2
commit 18c505c675
9 changed files with 378 additions and 337 deletions

View File

@@ -47,18 +47,12 @@
struct H5B_t {
H5AC_info_t cache_info; /* Information for H5AC cache functions, _must_ be */
/* first field in structure */
const H5B_class_t *type; /*type of tree */
size_t sizeof_node; /*size of raw (disk) node */
size_t sizeof_rkey; /*size of raw (disk) key */
size_t total_native_keysize; /*size of native keys */
H5RC_t *rc_shared; /*ref-counted shared info */
unsigned level; /*node level */
haddr_t left; /*address of left sibling */
haddr_t right; /*address of right sibling */
unsigned nchildren; /*number of child pointers */
H5RC_t *rc_page; /*ref-counted disk page */
uint8_t *raw_page; /*disk page (shared) */
uint8_t *native; /*array of keys in native format */
void **nkey; /*2k+1 key entries */
haddr_t *child; /*2k child pointers */
};