[12/13] comparison: When marking leaf nodes don't do unnecessary impact analysis

Message ID 87h6v3otz5.fsf_-_@redhat.com
State New
Series Support negative suppression specifications |

Commit Message

Dodji Seketeli March 2, 2023, 7:04 p.m. UTC

When marking leaf nodes, if interface impact analysis is not required,
then avoid visiting the same diff node twice when walking the diff
graph.  Allowing to visit the same diff node twice would be useful so
that the sub-graph of each interface diff node would be walked in full
to determine the impact of each leaf diff node on each interface.  But
if such impact analysis is not required, then we can just visit each


diff graph node once and speed up things greatly in leaf node
reporting mode.

	* src/abg-comparison.cc (corpus_diff::mark_leaf_diff_nodes): If
	impact analysis is not required, visit each node just once.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
 src/abg-comparison.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
index 886e48fd..1533d9d1 100644
--- a/src/abg-comparison.cc
+++ b/src/abg-comparison.cc
@@ -11230,7 +11230,8 @@  corpus_diff::mark_leaf_diff_nodes()
   bool s = context()->visiting_a_node_twice_is_forbidden();
-  context()->forbid_visiting_a_node_twice_per_interface(true);
+  if (context()->show_impacted_interfaces())
+    context()->forbid_visiting_a_node_twice_per_interface(true);