diff options
author | Jonathan Kim <jkm@hdfgroup.org> | 2012-10-19 21:28:14 (GMT) |
---|---|---|
committer | Jonathan Kim <jkm@hdfgroup.org> | 2012-10-19 21:28:14 (GMT) |
commit | 961a24ac3c18614850f998d7391728164090d1d6 (patch) | |
tree | a709aef783d7461aed3a924f84b4539af0a50a7d | |
parent | 14e7962b3058cdb2190829398fcf99b74f71aa5a (diff) | |
download | hdf5-961a24ac3c18614850f998d7391728164090d1d6.zip hdf5-961a24ac3c18614850f998d7391728164090d1d6.tar.gz hdf5-961a24ac3c18614850f998d7391728164090d1d6.tar.bz2 |
[svn-r22933] Purpose:
HDFFV-8145 h5diff slowness with version >= 1.8.7
Description:
Improved speed when comparing HDF5 files with lots of attributes. Much slower performance was identified with release version from 1.8.7 to 1.8.10 compared to 1.8.6.
Tested:
jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), Windows (32-LE cmake), cmake (jam)
-rw-r--r-- | release_docs/RELEASE.txt | 3 | ||||
-rw-r--r-- | tools/lib/h5diff_attr.c | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 937fa93..47653b1 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -733,6 +733,9 @@ Bug Fixes since HDF5-1.8.0 release Tools ----- + - h5diff: Improved speed when comparing HDF5 files with lots of + attributes. Much slower performance was identified with release version + from 1.8.7 to 1.8.10 compared to 1.8.6. (JKM 2012/10/19) - h5repack: "h5repack -f NONE file1.h5 out.h5" command failed if source file contains chunked dataset and a chunk dim is bigger than the dataset dim. Another issue is that the command changed max dims diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c index 144159a..130a0d8 100644 --- a/tools/lib/h5diff_attr.c +++ b/tools/lib/h5diff_attr.c @@ -207,6 +207,12 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t table_lp->nattrs_only2++; curr2++; } + + /* close for next turn */ + H5Aclose(attr1_id); + attr1_id = -1; + H5Aclose(attr2_id); + attr2_id = -1; } /* end while */ /* list1 did not end */ @@ -225,6 +231,10 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t table_attr_mark_exist(infile, name1, table_lp); table_lp->nattrs_only1++; curr1++; + + /* close for next turn */ + H5Aclose(attr1_id); + attr1_id = -1; } /* list2 did not end */ @@ -243,6 +253,9 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t table_attr_mark_exist(infile, name2, table_lp); table_lp->nattrs_only2++; curr2++; + + /* close for next turn */ + H5Aclose(attr2_id); } /*------------------------------------------------------ @@ -272,6 +285,11 @@ static herr_t build_match_list_attrs(hid_t loc1_id, hid_t loc2_id, table_attrs_t return 0; error: + if (0 < attr1_id) + H5Aclose(attr1_id); + if (0 < attr2_id) + H5Aclose(attr2_id); + return -1; } |