From b2fbe9dfac5749c87e39af3f3f0e94273bf1db73 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Fri, 3 Feb 2023 14:01:05 +0000 Subject: [PATCH] Stale doc file. Fix hashtag links. Trace some GC stuff and try malloc_trim, whynot. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4166 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- apps/docs/id_refactor.md | 17 ----------------- apps/ssb/commonmark-hashtag.js | 2 +- src/task.c | 3 +++ 3 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 apps/docs/id_refactor.md diff --git a/apps/docs/id_refactor.md b/apps/docs/id_refactor.md deleted file mode 100644 index b70cba18..00000000 --- a/apps/docs/id_refactor.md +++ /dev/null @@ -1,17 +0,0 @@ -# ID Refactor -[Back to index](#index) - -## Goals - - no way to get private key in javascript - - ssb.c syncs/broadcasts/... efficiently for everybody - -## Schema - - separate table to discourage leakage - - `CREATE TABLE identities (user TEXT, public TEXT, secret TEXT);` - -## API - - `ssb.createIdentity()` -> `id` - - `ssb.getIdentities()` => `[id, ...]` - - `ssb.deleteIdentity(id)` - - `ssb.post(id, ...)` - - `ssb.appendMessage(id, ...)` \ No newline at end of file diff --git a/apps/ssb/commonmark-hashtag.js b/apps/ssb/commonmark-hashtag.js index db07b620..02662fce 100644 --- a/apps/ssb/commonmark-hashtag.js +++ b/apps/ssb/commonmark-hashtag.js @@ -39,7 +39,7 @@ function splitMatches(text, regexp) { return result; } -const regex = new RegExp("\\W#[\\w-]+"); +const regex = new RegExp("(? n.literal).join(""); diff --git a/src/task.c b/src/task.c index 95240092..0ed2a48a 100644 --- a/src/task.c +++ b/src/task.c @@ -1328,7 +1328,10 @@ static void _tf_task_promise_rejection_tracker(JSContext* context, JSValueConst static void _tf_task_gc_timer(uv_timer_t* timer) { tf_task_t* task = timer->data; + tf_trace_begin(task->_trace, "JS_RunGC"); JS_RunGC(task->_runtime); + tf_trace_end(task->_trace); + malloc_trim(0); } static void _tf_task_trace_timer(uv_timer_t* timer)