summaryrefslogtreecommitdiffstats
path: root/src/H5Distore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-07-13 17:44:01 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-07-13 17:44:01 (GMT)
commit0a8d8c54b249b81c58e4ab7d6481d737e2857c7a (patch)
tree5e669d387686762c7779aee2200ec799ebf09ad3 /src/H5Distore.c
parent035a60c6f7e8397c79bd05179ff514ecc7b60779 (diff)
downloadhdf5-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/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 52b1f65..4520e65 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -955,9 +955,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")
@@ -3287,9 +3288,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")