diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-13 17:44:01 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-07-13 17:44:01 (GMT) |
commit | 0a8d8c54b249b81c58e4ab7d6481d737e2857c7a (patch) | |
tree | 5e669d387686762c7779aee2200ec799ebf09ad3 /src/H5Gnode.c | |
parent | 035a60c6f7e8397c79bd05179ff514ecc7b60779 (diff) | |
download | hdf5-0a8d8c54b249b81c58e4ab7d6481d737e2857c7a.zip hdf5-0a8d8c54b249b81c58e4ab7d6481d737e2857c7a.tar.gz hdf5-0a8d8c54b249b81c58e4ab7d6481d737e2857c7a.tar.bz2 |
[svn-r8865] Purpose:
Code optimization
Description:
Re-work the insertion of a new child into an existing node, to exploit
some speedups for adding the rightmost child, since this is a very common case
when appending records to an unlimited size dataset.
Also, hoist the checks for the tree's 'K' value into a field in the shared
information about the tree, instead of re-calculating them all the time.
Platforms tested:
Solaris 2.7 (arabica)
FreeBSD 4.10 (sleipnir) w/parallel
Too minor to require h5committest
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r-- | src/H5Gnode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c index a879e54..279d9da 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -1750,9 +1750,10 @@ H5G_node_init(H5F_t *f) /* Set up the "global" information for this file's groups */ shared->type= H5B_SNODE; + shared->two_k=2*H5F_KVALUE(f,H5B_SNODE); shared->sizeof_rkey = H5G_node_sizeof_rkey(f, NULL); assert(shared->sizeof_rkey); - shared->sizeof_rnode = H5B_nodesize(f, H5B_SNODE, &shared->sizeof_keys, shared->sizeof_rkey); + shared->sizeof_rnode = H5B_nodesize(f, shared, &shared->sizeof_keys); assert(shared->sizeof_rnode); if(NULL==(shared->page=H5FL_BLK_MALLOC(grp_page,shared->sizeof_rnode))) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree page") |