From c5039b88c7c028826d390bffe24d7d8c63e9ee3b Mon Sep 17 00:00:00 2001 From: Florrie Date: Sat, 15 Dec 2018 01:43:40 -0400 Subject: Update tui-lib, buildItems stress test I didn't have any luck optimizing buildItems though. It might be something to come back to some other time. (It's already quick enough to be usable, even on modland.json, that's for sure!) --- index.js | 9 +++++++++ tui-lib | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f1073e0..c366ed7 100755 --- a/index.js +++ b/index.js @@ -100,6 +100,8 @@ async function main() { root.h = h root.fixAllLayout() + const XXstress = func => '[disabled]' + const stress = func => { const start = Date.now() let n = 0 @@ -119,9 +121,16 @@ async function main() { root.fixAllLayout() }) + const listings = appElement.tabber.tabberElements + const lastListing = listings[listings.length - 1] + const nBuildItems = stress(() => { + lastListing.buildItems() + }) + process.stdout.write(ansi.cleanCursor() + ansi.clearScreen() + '\n') console.log('# of times we can render & flush:', nRenderAndFlush) console.log('# of times we can fix all layout:', nFixAllLayout) + console.log('# of times we can build items:', nBuildItems) process.exit(0) diff --git a/tui-lib b/tui-lib index d544986..e47a354 160000 --- a/tui-lib +++ b/tui-lib @@ -1 +1 @@ -Subproject commit d54498610d53e8c8a437a6adff0ced11b037afe7 +Subproject commit e47a3546f0f9244bb6ee3aa708e7e24226fbdad2 -- cgit 1.3.0-6-gf8a5