From faadda3007f4754d03ff66e703539976894320dd Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Wed, 19 Dec 2018 15:11:30 -0500 Subject: [PATCH] Make remixing/saving faster by marking all assets as clean to start. They were not being marked as clean when loaded from the server, causing remixes that included only minimal (or no) changes to take a very long time as it waited for hundreds of network requests to resolve. Mark them as clean when loaded from the server so we know they do not need to be resaved --- src/lib/vm-manager-hoc.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/vm-manager-hoc.jsx b/src/lib/vm-manager-hoc.jsx index f34490780..04bef4073 100644 --- a/src/lib/vm-manager-hoc.jsx +++ b/src/lib/vm-manager-hoc.jsx @@ -53,6 +53,9 @@ const vmManagerHOC = function (WrappedComponent) { loadProject () { return this.props.vm.loadProject(this.props.projectData) .then(() => { + // Mark all the assets as clean since they just got loaded + this.props.vm.assets.forEach(asset => (asset.clean = true)); + this.props.onLoadedProject(this.props.loadingState, this.props.canSave); // Wrap in a setTimeout because skin loading in // the renderer can be async. -- GitLab