-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Description
I noticed that find.ancestor() is quite slow. It seems like evaluate() is called too often.
flutter/packages/flutter_test/lib/src/finders.dart
Lines 957 to 960 in 04f7ea8
| @override | |
| Iterable<Element> apply(Iterable<Element> candidates) { | |
| return candidates.where((Element element) => ancestor.evaluate().contains(element)); | |
| } |
Possible fix:
Call ancestor.evaluate() only once at the beginning of the method instead of every time for every child.
Metadata
Metadata
Assignees
Labels
No labels