-
Improvement
-
Resolution: Done
-
Medium
-
None
-
None
We have a large number of users who assume acquiring CommonStmtContext.sourceReference() is cheap, which is not really the case. Most of the time the reference is acquired only for the purposes of throwing an exception – which we rarely really do.
Refactor SourceException and its subclasses to offer instantiation with CommonStmtCtx, calling sourceReference() only if an exception is about to be thrown.
This should help with code verbosity as well as improve performance.
- split from
-
YANGTOOLS-1184 Release InferredStatementContext's effective statements after build
- Resolved