From 40126060fb7914fdba64c7aa7dc62bcdef0017dd Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Mon, 3 Mar 2025 18:35:46 -0600 Subject: [PATCH] dramatically improve nota speed for nested arrays and objects --- source/qjs_nota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/qjs_nota.c b/source/qjs_nota.c index 3e8cb8db..5245b507 100755 --- a/source/qjs_nota.c +++ b/source/qjs_nota.c @@ -187,9 +187,9 @@ static void nota_encode_value(NotaEncodeContext *enc, JSValueConst val) return; case JS_TAG_OBJECT: { + if (JS_IsArrayBuffer(ctx, val)) { size_t bufLen; void *bufData = JS_GetArrayBuffer(ctx, &bufLen, val); - if (bufData) { /* Write as a blob of bits (bufLen * 8). */ nota_write_blob(&enc->nb, (unsigned long long)bufLen * 8, (const char*)bufData); return;