catstodon/app/javascript/flavours/glitch/utils/performance.ts
Echo 0d54a47ec3 [Glitch] Emoji Rendering Efficiency
Port 6bca52453a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2025-08-01 22:17:21 +02:00

19 lines
413 B
TypeScript

//
// Tools for performance debugging, only enabled in development mode.
// Open up Chrome Dev Tools, then Timeline, then User Timing to see output.
import * as marky from 'marky';
import { isDevelopment } from './environment';
export function start(name: string) {
if (isDevelopment()) {
marky.mark(name);
}
}
export function stop(name: string) {
if (isDevelopment()) {
marky.stop(name);
}
}