summaryrefslogtreecommitdiffstats
path: root/src/H5Distore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-07-13 17:44:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-07-13 17:44:05 (GMT)
commit0b2827f9ced045e36e4a88e16cfef7ca9250c89e (patch)
tree165512f159ea9a0720d3c22d850aa150b80e0fbe /src/H5Distore.c
parent81f50b436df5688f8ce592921820a0fe8dd71799 (diff)
downloadhdf5-0b2827f9ced045e36e4a88e16cfef7ca9250c89e.zip
hdf5-0b2827f9ced045e36e4a88e16cfef7ca9250c89e.tar.gz
hdf5-0b2827f9ced045e36e4a88e16cfef7ca9250c89e.tar.bz2
[svn-r8866] 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/H5Distore.c')
-rw-r--r--src/H5Distore.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 2a85991..fb21b75 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -963,9 +963,10 @@ H5D_istore_init (H5F_t *f, H5D_t *dset)
/* Set up the "global" information for this file's groups */
shared->type= H5B_ISTORE;
+ shared->two_k=2*H5F_KVALUE(f,H5B_ISTORE);
shared->sizeof_rkey = H5D_istore_sizeof_rkey(f, &udata);
assert(shared->sizeof_rkey);
- shared->sizeof_rnode = H5B_nodesize(f, H5B_ISTORE, &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(chunk_page,shared->sizeof_rnode)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree page")
@@ -3295,9 +3296,10 @@ H5D_istore_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE * stream, int inden
/* Set up the "global" information for this file's groups */
shared->type= H5B_ISTORE;
+ shared->two_k=2*H5F_KVALUE(f,H5B_ISTORE);
shared->sizeof_rkey = H5D_istore_sizeof_rkey(f, &udata);
assert(shared->sizeof_rkey);
- shared->sizeof_rnode = H5B_nodesize(f, H5B_ISTORE, &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(chunk_page,shared->sizeof_rnode)))
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for B-tree page")