data endpoint for entity 90008 (aka. a website)

try 'destroying' the sharp instances and konva stage

ptr.pet 2168e947 fa934c85

verified
Waiting for spindle ...
+11 -4
+11 -4
eunomia/src/lib/constellation.ts
··· 606 606 const sharpImg = await (stage.toCanvas() as unknown as Canvas).toSharp(); 607 607 const buffer = await sharpImg.webp({ effort: 6, quality: 30, smartDeblock: true }).toBuffer(); 608 608 await writeFile(DUST_FILE, buffer); 609 + sharpImg.destroy(); 610 + 611 + stage.destroyChildren(); 612 + stage.destroy(); 609 613 610 614 const projected: Record<string, ProjectedTrans> = {}; 611 615 ··· 749 753 console.log('generating OG image...'); 750 754 (async () => { 751 755 const h = 630; 752 - const resized_svg = await sharp(OUTPUT_FILE).resize({ height: h }).toBuffer(); 753 - sharp(DUST_FILE) 756 + const s = sharp(OUTPUT_FILE).resize({ height: h }) 757 + const resized_svg = await s.toBuffer(); 758 + const og = sharp(DUST_FILE) 754 759 .resize({ height: h }) 755 760 .composite([{ input: resized_svg }]) 756 - .png() 757 - .toFile(OG_IMAGE_FILE); 761 + .png(); 762 + await og.toFile(OG_IMAGE_FILE); 763 + s.destroy(); 764 + og.destroy(); 758 765 })(); 759 766 760 767 console.log(`rendered constellation in ${Date.now() - start}ms`);