asdf icon indicating copy to clipboard operation
asdf copied to clipboard

Optional one-time validation of ASDF file

Open drdavella opened this issue 8 years ago • 0 comments

ASDF trees are currently validated on assignment. For example:

af = AsdfFile()
af.tree = {'data': numpy.array( ... )}

PR #310 attempts to extend this to all top-level tree assignment:

af = AsdfFile()
af.tree['data'] = numpy.array( ... )

However, there may be cases where neither of these approaches are desirable due to the performance penalty they incur. Instead, it would be useful to have no validation when assigning to the tree, but to validate only once.

Questions:

  • what are the use cases where up-front validation incurs the most cost?
  • is it sufficient to defer validation until write time?
  • should up-front validation be the default?
  • how should this be configured?

This makes the case stronger for more module-level configuration like that proposed in #313.

drdavella avatar Aug 24 '17 20:08 drdavella