Optimize isConfiguration()/isIgnoringConfig() interplay 66/87166/2
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 25 Jan 2020 10:29:21 +0000 (11:29 +0100)
committerRobert Varga <nite@hq.sk>
Mon, 27 Jan 2020 12:50:05 +0000 (12:50 +0000)
commit7cb2365fa775c4b3026aa77662d34fddbda30b60
tree81d4a07a1b537b48ee8423f653a201cb04cf4b93
parent79244c9c657423d5cf853952e6e00d1f687749ea
Optimize isConfiguration()/isIgnoringConfig() interplay

Now that we have coalesced these two states into a flag field,
their interplay is more apparent -- isIgnoringConfig() is always
checked before isConfiguration() and if it is set, it also implies
isConfiguration() is also set.

Using flags allows us to express this implication by simply setting
the right bits. This results in fewer flag operations performed and
a more direct dispatch between methods.

isConfiguration() is also improved to access parent.isConfiguration()
only when necessary, improving performance when a config substatement
is present.

JIRA: YANGTOOLS-652
Change-Id: Ifb18ee16e33e93de4300cc80e4ba67a9ae40bbde
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-reactor/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/reactor/StatementContextBase.java