Skip to content

Commit f31d148

Browse files
committed
Iterate parent of each child
1 parent 198b5e4 commit f31d148

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/performance/app/routes/update-with-same-state.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default Route.extend({
55
store: service(),
66

77
async model() {
8+
console.group('test-setup');
89
performance.mark('start-data-generation');
910

1011
const initialPayload = await fetch('./fixtures/add-children-initial.json').then((r) => r.json());
@@ -32,6 +33,7 @@ export default Route.extend({
3233
const children = await parent.children;
3334

3435
await logChildren(parent);
36+
console.groupEnd();
3537

3638
performance.mark('start-local-removal');
3739
console.group('start-local-removal');
@@ -74,10 +76,9 @@ function iterateChild(record, seen) {
7476
}
7577
seen.add(record);
7678

77-
record.bestFriend.get('name');
78-
record.secondBestFriend.get('name');
79-
record.friends.forEach((child) => iterateChild(child, seen));
79+
record.parent.get('name');
8080
}
81+
8182
function iterateParent(record, seen) {
8283
seen.add(record);
8384
record.children.forEach((child) => iterateChild(child, seen));

0 commit comments

Comments
 (0)