From 31a270fcd95e92c3dd3eb939da4749710571f497 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 14 Nov 2022 17:48:06 +0300 Subject: [PATCH] tweaks and notes... Signed-off-by: Alex A. Naanou --- pwiki/store/base.js | 8 +++++--- pwiki2.js | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pwiki/store/base.js b/pwiki/store/base.js index 3e11c0b..141d374 100755 --- a/pwiki/store/base.js +++ b/pwiki/store/base.js @@ -19,6 +19,10 @@ var index = require('../index') //--------------------------------------------------------------------- // XXX EXPERIMENTAL... +// XXX this will not work on nodejs... +// ...possible solutions would be: +// LevelDB +// indexeddb (npm) // XXX see bugs/issues... // XXX not sure if we need this... var JournalDB = @@ -122,9 +126,7 @@ object.Constructor('JournalDB', { .objectStore('journal') .add({ // high-resolution date... - date: - performance.timing.navigationStart - + performance.now(), + date: Date.hires(), path, action, data, diff --git a/pwiki2.js b/pwiki2.js index 47ef329..2e18e7d 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -40,6 +40,10 @@ * XXX index: would be nice to somehow persistently auto-generate index id's... * ...maybe: ":" or something similar... * ...would be nice to have store ids... +* XXX index: journal: might be a fun idea to try a simple sync file store +* - a json format simply appending elements in the format: +* ',\n\t[ ... ]' +* - appending a '\n}' on exit * XXX .journal: needed to break the update recursion -- i.e. decouple * index .update(..) handlers from stored page updates by first * updating the journal and on a timer updating the .cache/ page...