]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(devtools): clear performance measures (#13701) main
authorawaken1ng <sunlightlucid@gmail.com>
Fri, 25 Jul 2025 00:48:57 +0000 (07:48 +0700)
committerGitHub <noreply@github.com>
Fri, 25 Jul 2025 00:48:57 +0000 (08:48 +0800)
close #13700

packages/runtime-core/src/profiling.ts

index 1984f5a21f2c10168c1f2692797d61dfcda85780..4e832a7c4a9ad7912341fef755ebd771ed39712f 100644 (file)
@@ -28,12 +28,10 @@ export function endMeasure(
   if (instance.appContext.config.performance && isSupported()) {
     const startTag = `vue-${type}-${instance.uid}`
     const endTag = startTag + `:end`
+    const measureName = `<${formatComponentName(instance, instance.type)}> ${type}`
     perf.mark(endTag)
-    perf.measure(
-      `<${formatComponentName(instance, instance.type)}> ${type}`,
-      startTag,
-      endTag,
-    )
+    perf.measure(measureName, startTag, endTag)
+    perf.clearMeasures(measureName)
     perf.clearMarks(startTag)
     perf.clearMarks(endTag)
   }