summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-04-24 20:10:13 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2018-04-24 20:10:13 (GMT)
commite6bc326ec0c417ef7b003da535b2e071442d2067 (patch)
tree700a274f00d7cee9d17c14c79dca71d97a328fc1 /fortran/src
parentb3c5284692093953132c6c8227e0980b670bf4ad (diff)
downloadhdf5-e6bc326ec0c417ef7b003da535b2e071442d2067.zip
hdf5-e6bc326ec0c417ef7b003da535b2e071442d2067.tar.gz
hdf5-e6bc326ec0c417ef7b003da535b2e071442d2067.tar.bz2
Fix for HDFFV-10180 Performance issues with H5Oget_info.
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5Af.c3
-rw-r--r--fortran/src/H5Gf.c3
-rw-r--r--fortran/src/H5Of.c21
3 files changed, 17 insertions, 10 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 23dd936..c75f19e 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -143,7 +143,8 @@ h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num)
/*
* Call H5Oget_info function.
*/
- if(H5Oget_info((hid_t)*obj_id, &oinfo) < 0)
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_NUM_ATTRS 0x0002u Fill in the num_attrs field */
+ if(H5Oget_info2((hid_t)*obj_id, &oinfo, (unsigned)2) < 0)
HGOTO_DONE(FAIL);
/* Set number of attributes */
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index b829b20..4ce7970 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -200,7 +200,8 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
/* Query the object's information */
if(H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, c_obj_name, c_obj_namelen, H5P_DEFAULT) < 0)
goto DONE;
- if(H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5P_DEFAULT) < 0)
+ /* TO DO: See flags for H5Oget_info in H5Opublic.h */
+ if(H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, 0, H5P_DEFAULT) < 0)
goto DONE;
/* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index 7d065a5..63d0084 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -250,7 +250,8 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op,
/*
* Call H5Ovisit
*/
- func_ret_value = H5Ovisit( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data);
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ func_ret_value = H5Ovisit( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data, (unsigned)15);
ret_value = (int_f)func_ret_value;
@@ -330,8 +331,9 @@ h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *l
/*
* Call H5Oinfo_by_name function.
*/
- if(H5Oget_info_by_name((hid_t)*loc_id, c_name,
- &Oinfo, (hid_t)*lapl_id) < 0)
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ if(H5Oget_info_by_name2((hid_t)*loc_id, c_name,
+ &Oinfo, (unsigned)15, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -385,8 +387,9 @@ h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
/*
* Call H5Oinfo_by_idx function.
*/
- if(H5Oget_info_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
- &Oinfo, (hid_t)*lapl_id) < 0)
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ if(H5Oget_info_by_idx2((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
+ &Oinfo, (unsigned)15, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -424,7 +427,8 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info)
/*
* Call H5Oinfo_by_name function.
*/
- if(H5Oget_info((hid_t)*object_id, &Oinfo) < 0)
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ if(H5Oget_info2((hid_t)*object_id, &Oinfo, (unsigned)15) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -532,8 +536,9 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f
/*
* Call H5Ovisit
*/
- func_ret_value = H5Ovisit_by_name( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
- op, op_data, (hid_t)*lapl_id);
+ /* TO DO: See H5Opublic.h: #define H5O_INFO_ALL (H5O_INFO_TIME|H5O_INFO_NUM_ATTRS|H5O_INFO_HDR|H5O_INFO_META_SIZE) */
+ func_ret_value = H5Ovisit_by_name2( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
+ op, op_data, (unsigned)15, (hid_t)*lapl_id);
ret_value = (int_f)func_ret_value;
done: