From 498ae1df439e0d81c86de2224d667b2e1a18354a Mon Sep 17 00:00:00 2001 From: Lakitna Date: Thu, 5 Oct 2023 20:33:39 +0200 Subject: [PATCH] Removed redundant fork in AST traversing in SplitTooLongLine These two innocuous lines meant that processing time increases exponentially with the number of `ELSE IF`s, causing performance issues in specific situations. --- robotidy/transformers/SplitTooLongLine.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/robotidy/transformers/SplitTooLongLine.py b/robotidy/transformers/SplitTooLongLine.py index 21e1a813..a22170dc 100644 --- a/robotidy/transformers/SplitTooLongLine.py +++ b/robotidy/transformers/SplitTooLongLine.py @@ -121,8 +121,6 @@ def visit_Section(self, node): # noqa def visit_If(self, node): # noqa if self.is_inline(node): return node - if node.orelse: - self.generic_visit(node.orelse) return self.generic_visit(node) @staticmethod