diff --git a/package.json b/package.json index 58063c0f529d6e7e66126062b60c766bf529dfca..0a94d9001e0050e427120077d692d1b8dab0eb35 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "watch": "concurrently --kill-others \"npm:watch-ts\" \"npm:watch-extra\" \"npm:watch-webpack\"", "watch-ts": "tsc -watch", "watch-extra": "cpx \"src/**/*.{vert,frag,glsl,scss,woff,woff2,ttf,otf,eot,svg,html,gql}\" build/src/ --watch", - "build-webpack": "webpack --mode development", + "build-webpack": "webpack --mode production", "watch-webpack": "webpack -w --mode development", "model-server": "node build/src/servers/model/server.js", "model-server-watch": "nodemon --watch build/src build/src/servers/model/server.js" diff --git a/src/mol-plugin/behavior/static/state.ts b/src/mol-plugin/behavior/static/state.ts index 2e53ede8c6ae73956b50ce2fc5061749bfd8a3a1..74424b9d615f8e31c7a024c893258a09e3be287c 100644 --- a/src/mol-plugin/behavior/static/state.ts +++ b/src/mol-plugin/behavior/static/state.ts @@ -51,7 +51,7 @@ export function SetCurrentObject(ctx: PluginContext) { } export function Update(ctx: PluginContext) { - PluginCommands.State.Update.subscribe(ctx, ({ state, tree }) => ctx.runTask(state.updateTree(tree))); + PluginCommands.State.Update.subscribe(ctx, ({ state, tree, doNotLogTiming }) => ctx.runTask(state.updateTree(tree, doNotLogTiming))); } export function ApplyAction(ctx: PluginContext) { diff --git a/src/mol-plugin/command.ts b/src/mol-plugin/command.ts index d17b98dae56c01efee9f206175a789062c7e10a2..5e99045b27de4231d3ba30f5d2314216221d64b9 100644 --- a/src/mol-plugin/command.ts +++ b/src/mol-plugin/command.ts @@ -17,7 +17,7 @@ export const PluginCommands = { State: { SetCurrentObject: PluginCommand<{ state: State, ref: Transform.Ref }>(), ApplyAction: PluginCommand<{ state: State, action: StateAction.Instance, ref?: Transform.Ref }>(), - Update: PluginCommand<{ state: State, tree: State.Tree | State.Builder }>(), + Update: PluginCommand<{ state: State, tree: State.Tree | State.Builder, doNotLogTiming?: boolean }>(), RemoveObject: PluginCommand<{ state: State, ref: Transform.Ref }>(), diff --git a/src/mol-plugin/state/animation/built-in.ts b/src/mol-plugin/state/animation/built-in.ts index 86593b3f48b0e62aabbb14236eef4d158aca02e0..d8f3b054feb017bec2c805531812832e41fe8054 100644 --- a/src/mol-plugin/state/animation/built-in.ts +++ b/src/mol-plugin/state/animation/built-in.ts @@ -70,7 +70,7 @@ export const AnimateModelIndex = PluginStateAnimation.create({ }); } - await PluginCommands.State.Update.dispatch(ctx.plugin, { state, tree: update }); + await PluginCommands.State.Update.dispatch(ctx.plugin, { state, tree: update, doNotLogTiming: true }); if (params.mode.name === 'once' && isEnd) return { kind: 'finished' }; if (params.mode.name === 'palindrome') return { kind: 'next', state: { palindromeDirections } }; diff --git a/webpack.config.js b/webpack.config.js index 3a2db252989711386f98d744c3c559fb6858991a..b1e30e9eff7f3eb08beb13ffcd3a9c2745570fab 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -49,6 +49,8 @@ const sharedConfig = { }), new webpack.DefinePlugin({ __PLUGIN_VERSION_TIMESTAMP__: webpack.DefinePlugin.runtimeValue(() => `${new Date().valueOf()}`, true), + // include this for production version of React + // 'process.env.NODE_ENV': JSON.stringify('production') }), new MiniCssExtractPlugin({ filename: 'app.css' }) ],