[10/13] comp-filter: Don't re-visit node while applying filters to diff nodes

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

Commit Message

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

When applying a filter to a corpus_diff node, visit each diff node
only once.  This can have some serious performance impact when there
are a lot of diff nodes to visit.

	* src/abg-comp-filter.cc (apply_filter): In the overload for
	corpus_diff, visit each diff node only once.

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


diff --git a/src/abg-comp-filter.cc b/src/abg-comp-filter.cc
index 83c406cf..5300d07c 100644
--- a/src/abg-comp-filter.cc
+++ b/src/abg-comp-filter.cc
@@ -41,7 +41,7 @@  void
 apply_filter(filter_base& filter, corpus_diff_sptr d)
   bool s = d->context()->visiting_a_node_twice_is_forbidden();
-  d->context()->forbid_visiting_a_node_twice(false);
+  d->context()->forbid_visiting_a_node_twice(true);