EXODUS: Prototype to see if can speed up field metadata output #468
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
exi_persist_redef
andexi_persist_leavedef
which will stay in netCDF define mode even thoughexi_redef
andexi_leavedef
are called.exi_redef
andexi_leavedef
are wrappers around the netCDFnc_redef
andnc_enddef
calls that go in and out of defined mode.If
exi_persist_redef
is called, it checks whether in define mode and if in persisted define mode. It will either go into define mode, or if already in persistent mode, it will increment a counter which is decremented onexi_persist_leavedef
and if reaches a value of 1, it leaves persist define mode.Note that currently, can only nest the calls up to 7 deep (unchecked) or the counter will wrap around. (Probably not that important to save space with a 3-wide bit field, but that is how it is currently).
This should speed up the
ex_put_field_metadata
andex_put_multi_field_metadata
calls since they write lots of attributes which move in and out of define mode.Can also look at not writing empty attributes or defaulted attributes if it is still slow.