Skip to content

Commit

Permalink
A better test for the performance regression discussed in TiddlyWiki/…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jermolene committed Sep 19, 2021
1 parent 46e64ad commit 6795c9f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ const puppeteer = require('puppeteer'),
}
const url = `file://${path.resolve(filepath)}`;
console.log(url);
const browser = await puppeteer.launch();
const browser = await puppeteer.launch({
headless: true
});
const page = await browser.newPage();
const navigationPromise = page.waitForNavigation();
await page.goto(url);
await page.goto(url,{
waitUntil: "load"
});
await page.setViewport({ width: 1440, height: 714 });
await navigationPromise;
await page.waitForSelector('.tc-sidebar-lists .tc-tab-buttons > button:nth-child(1)');
console.log(JSON.parse(await page.evaluate(() => JSON.stringify($tw.perf.logger.buffer))));
await browser.close();
Expand Down
6 changes: 5 additions & 1 deletion payload/performance-test-tiddler.tid
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
title: $:/performance-test-tiddler

<$macrocall $name="timeline" format={{$:/language/RecentChanges/DateFormat}} limit="10000"/>
<$list filter="[range[0:50]]" variable="count">
<$list filter="[all[tiddlers]sort[modified]sort[title]sort[modifier]]">
<$text text=<<currentTiddler>>/>
</$list>
</$list>

0 comments on commit 6795c9f

Please sign in to comment.