From dcb9ae2f686b2f631e306e127ab3d574a77e9171 Mon Sep 17 00:00:00 2001 From: apex Date: Wed, 25 Jun 2025 04:31:31 -0400 Subject: [PATCH] optimized compiler for GC --- gendictionary.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gendictionary.js b/gendictionary.js index a317b13..944e0f5 100644 --- a/gendictionary.js +++ b/gendictionary.js @@ -29,10 +29,10 @@ reader.on('line', (line) => { }); -async function writeThesaurus(thispath, entry) { + function writeThesaurus(thispath, entry) { } -async function writeSounds(thispath, entry) { + function writeSounds(thispath, entry) { var sounds = JSON.parse(fs.readFileSync(thispath+"sounds.json",'utf-8')); if (entry.sounds == null){ @@ -51,8 +51,9 @@ async function writeSounds(thispath, entry) { } }); fs.writeFileSync(thispath+"sounds.json",JSON.stringify(sounds)); + sounds = null; } -async function writeDefinitions(thispath, entry) { + function writeDefinitions(thispath, entry) { var definitions = JSON.parse(fs.readFileSync(thispath+"definitions.json",'utf-8')); @@ -67,7 +68,7 @@ async function writeDefinitions(thispath, entry) { definitions.glosses.push(ele.glosses); }); fs.writeFileSync(thispath+"definitions.json", JSON.stringify(definitions)); - + definitions = null; } function initializeDir(path) { fs.mkdirSync(path, {recursive:true});