Files
discord-decomp/sources/by-id/module-06373.jsx
T
2026-07-27 16:20:00 +03:00

82 lines
4.2 KiB
React

/* Metro module 6373; source: unknown; dependencies: [6374, 6375, 6379, 6380] */
function _fun49953(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6551:6, offset: 0x0120e0f0, size: 104 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6374) /* metro dependency 6374 */;
const env0_3 = importDefault(6375) /* metro dependency 6375 */;
exports.RenderTimeTracker = _fun49954();
}
function _fun49954() { // fn#49954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6551:118, offset: 0x0120e158, size: 155 bytes, params: 1, frame: 15
return env0_3(RenderTimeTracker, [{key: 'startTracking', value: value_49956}, {key: 'markRenderComplete',
value: value_49957}, {key: 'hasExceededMaxRendersWithoutCommit', value: function() {
return this.rendersWithoutCommit >= this.maxRendersWithoutCommit;
}}, {key: 'getRawValue', value: function() {
return this.renderTimeAvgWindow.currentValue;
}}, {key: 'getAverageRenderTime', value: value_49960}]);
}
function RenderTimeTracker() { // fn#49955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6551:139, offset: 0x0120e1f3, size: 129 bytes, params: 1, frame: 14
const value = environment.__proto__;
env1_2(this, RenderTimeTracker);
const AverageWindow = (require(6379) /* metro dependency 6379 */).AverageWindow;
this.renderTimeAvgWindow = new AverageWindow(5);
this.lastTimerStartedAt = -1;
this.maxRenderTime = 32;
this.defaultRenderTime = 16;
this.rendersWithoutCommit = 0;
this.maxRendersWithoutCommit = 40;
}
function value_49956() { // fn#49956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6551:414, offset: 0x0120e274, size: 102 bytes, params: 1, frame: 13
var Date;
const rendersWithoutCommit = this.rendersWithoutCommit;
this.rendersWithoutCommit = typeof rendersWithoutCommit === 'bigint' ? rendersWithoutCommit + 1n : +rendersWithoutCommit + 1;
const value = environment.__proto__;
const PlatformConfig = (require(6380) /* metro dependency 6380 */).PlatformConfig;
if (PlatformConfig.trackAverageRenderTimeForOffsetProjection && this.lastTimerStartedAt === -1) {
Date = global.Date;
this.lastTimerStartedAt = Date.now();
}
}
function value_49957() { // fn#49957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6551:634, offset: 0x0120e2da, size: 128 bytes, params: 1, frame: 14
var renderTimeAvgWindow;
this.rendersWithoutCommit = 0;
const value = environment.__proto__;
const PlatformConfig = (require(6380) /* metro dependency 6380 */).PlatformConfig;
if (PlatformConfig.trackAverageRenderTimeForOffsetProjection && this.lastTimerStartedAt !== -1) {
renderTimeAvgWindow = this.renderTimeAvgWindow;
renderTimeAvgWindow.addValue(global.Date.now() - this.lastTimerStartedAt);
this.lastTimerStartedAt = -1;
}
}
function value_49960() { // fn#49960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6551:1177, offset: 0x0120e380, size: 126 bytes, params: 1, frame: 18
var r0;
var Math;
var min;
var maxRenderTime;
var Math2;
var max;
var Math3;
let value = environment.__proto__;
const PlatformConfig = (require(6380) /* metro dependency 6380 */).PlatformConfig;
if (PlatformConfig.trackAverageRenderTimeForOffsetProjection) {
Math = global.Math;
min = Math.min;
maxRenderTime = this.maxRenderTime;
Math2 = global.Math;
max = Math2.max;
Math3 = global.Math;
value = Math3.round(this.renderTimeAvgWindow.currentValue);
value = Reflect.apply(min, Math, [maxRenderTime, Reflect.apply(max, Math2, [value, 16])]);
r0 = value;
} else {
r0 = this.defaultRenderTime;
}
return r0;
}