From bf555c113fbe17a5eb6b28cf0e411d9b13ef2e93 Mon Sep 17 00:00:00 2001 From: Nathan Regner <9659564+nathanregner@users.noreply.github.com> Date: Wed, 17 Jul 2024 12:28:14 -0600 Subject: [PATCH] perf: fix hang when leaving G-Code Preview page (#1949) --- src/store/gcodeviewer/mutations.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/gcodeviewer/mutations.ts b/src/store/gcodeviewer/mutations.ts index 2639357a1..86e2d3682 100644 --- a/src/store/gcodeviewer/mutations.ts +++ b/src/store/gcodeviewer/mutations.ts @@ -1,7 +1,7 @@ import { getDefaultState } from './index' import { MutationTree } from 'vuex' import { GcodeviewerState } from '@/store/gcodeviewer/types' -import Vue from 'vue' +import Vue, { markRaw } from 'vue' export const mutations: MutationTree = { reset(state) { @@ -9,7 +9,7 @@ export const mutations: MutationTree = { }, setViewerBackup(state, backup) { - Vue.set(state, 'viewerBackup', backup) + Vue.set(state, 'viewerBackup', markRaw(backup) /* viewer object is large and quite slow to proxy */) }, setCanvasBackup(state, backup) {