Skip to content

Commit 738caaf

Browse files
committed
Improve rendering performance by rendering specs after initial mount
1 parent 7c16cc2 commit 738caaf

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

src/app.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ let appSpec = {
5353
// TODO move this to Score
5454
testTime: 0,
5555
favicon: '',
56+
mounted: false,
5657
};
5758
},
5859

@@ -61,11 +62,20 @@ let appSpec = {
6162
this.featureTypeTitles = featureTypeTitles;
6263
},
6364

65+
mounted() {
66+
this.updateFavicon();
67+
this.mounted = true;
68+
},
69+
6470
computed: {
6571
/** Sorted and filtered specs
6672
* @type {Spec[]}
6773
*/
6874
specs () {
75+
if (!this.mounted) {
76+
return [];
77+
}
78+
6979
let specs = this.allSpecsList.filter(spec => spec.matchesFilter(this.filter.show));
7080

7181
if (this.filter.spec) {
@@ -90,10 +100,6 @@ let appSpec = {
90100
},
91101
},
92102

93-
mounted() {
94-
this.updateFavicon();
95-
},
96-
97103
methods: {
98104
passclass,
99105
round,

0 commit comments

Comments
 (0)