diff --git a/src/ifctester/ifctester/ids.py b/src/ifctester/ifctester/ids.py index 55b8e49782..24bed309b8 100644 --- a/src/ifctester/ifctester/ids.py +++ b/src/ifctester/ifctester/ids.py @@ -201,7 +201,13 @@ class Specification: return elements = [] - for facet in self.applicability: + for i, facet in enumerate(self.applicability): + # Usually, we rely on an entity applicability to give us our first + # shortlist of elements, as it's the most efficient way to filter + # elements. If this does not exist, then we have no choice but to + # check everything. + if i == 0 and not isinstance(facet, Entity): + elements = list(ifc_file) elements = facet.filter(ifc_file, elements) for element in elements: