From dd4727770a4cd70519040d6b089163efb2af10ae Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Tue, 26 Jul 2022 16:33:30 -0400 Subject: [PATCH] Fix CPU performance leak --- backend-rs/Cargo.lock | 2 +- backend-rs/Cargo.toml | 2 +- main.py | 2 +- src/index.tsx | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/backend-rs/Cargo.lock b/backend-rs/Cargo.lock index 49a8203..06fdeac 100644 --- a/backend-rs/Cargo.lock +++ b/backend-rs/Cargo.lock @@ -106,7 +106,7 @@ dependencies = [ [[package]] name = "fantastic-rs" -version = "0.3.0" +version = "0.3.1" dependencies = [ "log", "serde", diff --git a/backend-rs/Cargo.toml b/backend-rs/Cargo.toml index 6fa98e3..b18d4d0 100644 --- a/backend-rs/Cargo.toml +++ b/backend-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fantastic-rs" -version = "0.3.0" +version = "0.3.1" edition = "2021" [dependencies] diff --git a/main.py b/main.py index 264af5d..4db3d9c 100644 --- a/main.py +++ b/main.py @@ -27,4 +27,4 @@ class Plugin: # startup self.backend_proc = subprocess.Popen([PARENT_DIR + "/backend"]) while True: - asyncio.sleep(1) + await asyncio.sleep(1) diff --git a/src/index.tsx b/src/index.tsx index 23a237e..02119a8 100755 --- a/src/index.tsx +++ b/src/index.tsx @@ -156,6 +156,7 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({serverAPI}) => { ctx.stroke(); ctx.fill(); } + console.debug("Rendered fan graph canvas frame", frameCount); //console.debug("Drew canvas with " + curveGlobal.length.toString() + " points; " + width.toString() + "x" + height.toString()); //ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); //ctx.fillStyle = '#000000';