AIX: profiler: force fallback which is class scoped

The 'performance' API is global and conflicting between calls.
This commit is contained in:
Enrico Ros
2025-03-17 06:00:53 -07:00
parent 0f9c02e249
commit 420b8c49c6
@@ -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();
}