From 420b8c49c672aa8aecb3deb46816a3fb7de05ab6 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Mon, 17 Mar 2025 06:00:53 -0700 Subject: [PATCH] AIX: profiler: force fallback which is class scoped The 'performance' API is global and conflicting between calls. --- src/modules/aix/server/dispatch/PerformanceProfiler.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/aix/server/dispatch/PerformanceProfiler.ts b/src/modules/aix/server/dispatch/PerformanceProfiler.ts index 4f7e93baa..a3c607dba 100644 --- a/src/modules/aix/server/dispatch/PerformanceProfiler.ts +++ b/src/modules/aix/server/dispatch/PerformanceProfiler.ts @@ -66,8 +66,12 @@ class _EdgePerformanceFallback { * Retuns the performance API, or a lightweight fallback when it's not available. */ function _getPerformanceAPI(): typeof performance | _EdgePerformanceFallback { - if (typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.measure === 'function') - return performance; + + // FIXME: we are forcing the fallback for now, as the performance API would conflict with Beam + // as 'marks' are global and would conflict between chats. + // if (typeof performance !== 'undefined' && typeof performance.mark === 'function' && typeof performance.measure === 'function') + // return performance; + return new _EdgePerformanceFallback(); }