Make initialSemanticsTreeCreation less sensitive to GC timing. (#19491)
Bug: https://github.com/flutter/flutter/issues/19435
This commit is contained in:
@@ -5,7 +5,16 @@
|
||||
import 'package:flutter_driver/driver_extension.dart';
|
||||
import 'package:complex_layout/main.dart' as app;
|
||||
|
||||
// Avoid sensitivity to GC timing.
|
||||
dynamic provokeSemispaceGrowth() {
|
||||
dynamic tree(int n) {
|
||||
return n == 0 ? null : <dynamic>[tree(n - 1), tree(n - 1)];
|
||||
}
|
||||
return tree(16); // 2^16 * 6 words ~= 1.5 MB
|
||||
}
|
||||
|
||||
void main() {
|
||||
provokeSemispaceGrowth();
|
||||
enableFlutterDriverExtension();
|
||||
app.main();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user