Skip to content

Commit ce864aa

Browse files
author
Robert Moore
authored
[Runtime] Only select UIViewController subclasses (#22)
Any example being shown by the Catalog By Convention is a UIViewController (or subclass). Execution of Catalog By Convention code can be reduced by up to 15% (672 ms to 570 ms in one test) by performing this filter before checking response to the selector `catalogBreadcrumbs`. Closes #21
1 parent 6939307 commit ce864aa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/private/CBCRuntime.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ BOOL CBCCatalogIsDebugLeaf(Class aClass) {
9494
if (hasIgnoredPrefix) {
9595
continue;
9696
}
97+
if (![aClass isSubclassOfClass:[UIViewController class]]) {
98+
continue;
99+
}
97100
[classes addObject:aClass];
98101
}
99102

0 commit comments

Comments
 (0)