From cac3160752454eb1ed2725eb37c13a740003c22d Mon Sep 17 00:00:00 2001 From: lizhihua <275091674@qq.com> Date: Wed, 31 Jan 2018 14:24:57 +0800 Subject: [PATCH] Vue.config.performance can't work https://jsfiddle.net/50wL7mdz/94913/ --- src/core/util/perf.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/util/perf.js b/src/core/util/perf.js index 4a537b2dada..312099d1a45 100644 --- a/src/core/util/perf.js +++ b/src/core/util/perf.js @@ -1,3 +1,4 @@ +import config from '../config' import { inBrowser } from './env' export let mark @@ -16,9 +17,11 @@ if (process.env.NODE_ENV !== 'production') { mark = tag => perf.mark(tag) measure = (name, startTag, endTag) => { perf.measure(name, startTag, endTag) - perf.clearMarks(startTag) - perf.clearMarks(endTag) - perf.clearMeasures(name) + if (!config.performance) { + perf.clearMarks(startTag) + perf.clearMarks(endTag) + perf.clearMeasures(name) + } } } }