Skip to content

Don't read iterations if they have already been parsed#1089

Merged
ax3l merged 1 commit intoopenPMD:devfrom
franzpoeschel:fix-streaming-api-reparsing
Aug 17, 2021
Merged

Don't read iterations if they have already been parsed#1089
ax3l merged 1 commit intoopenPMD:devfrom
franzpoeschel:fix-streaming-api-reparsing

Conversation

@franzpoeschel
Copy link
Contributor

Until now the condition to not reread an iteration in the streaming API was if the Iteration.closed attribute was present.
In datasets where such an attribute was never written, this leads to reparsing of the entire series in every iteration (i.e. quadratic parsing cost). Iterations are not changed after they are first seen, so rereading is not necessary.

@franzpoeschel franzpoeschel added this to the 0.14.2 milestone Aug 17, 2021
@ax3l ax3l self-requested a review August 17, 2021 20:52
@ax3l ax3l self-assigned this Aug 17, 2021
Copy link
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix! 🎉

@ax3l ax3l merged commit 040a9b0 into openPMD:dev Aug 17, 2021
ax3l pushed a commit to ax3l/openPMD-api that referenced this pull request Aug 18, 2021
ax3l added a commit that referenced this pull request Aug 18, 2021
* Bug fix: Don't forget closing files (#1083)

* Failing test
* Bug fix: Don't forget closing files

* HDF5: Fix String Vlen Attribute Reads (#1084)

We inofficially try to also support HDF5 variable lengths strings in
reading, just to increase compatibility.

This was never working it seems.

* Fix reading of vector attributes with only one contained value (#1085)

* Failing test

* Conversions in Attribute.hpp

1) single values to 1-value vectors
2) vectors to arrays
3) arrays to vectors

* Some cleanup in Attribute.hpp

1) Simplify types in DoConvert, remove unnecessary template parameter
2) Replace a long if-then-else chain by variantSrc::visit

* CoreTest: Fix std::array constructors

Make more widely compile-able.

* Explicit casting in some places

This avoids some warnings

* Intel compilers: Don't use variantSrc::visit

They don't like it

* Remove scattered checks for vector attributes

* Generalize icpc guard

As defined in CMake for compiler identification.

* Doc ICC version (2021.3.0)

* setAttribute: Reject Empty Strings (#1087)

* setAttribute: Reject Empty Strings

Some backends, especially HDF5, do not allow us to define zero-sized
strings. We thus need to catch this in the frontend and forward the
restriction to the user.

* Test: setAttribute("key", "") throws

* setAttribute Check: C++14 compatible

* Don't read iterations if they have already been parsed (#1089)

* Release: 0.14.2

Co-authored-by: Franz Pöschel <franz.poeschel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants