mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-15 08:48:53 +00:00
[Glitch] Emoji Rendering Efficiency
Port 6bca52453a to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
19
app/javascript/flavours/glitch/utils/performance.ts
Normal file
19
app/javascript/flavours/glitch/utils/performance.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user