From feeb80fe227eb9d4b01a9d3119e5fd07d399fea9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 17 Jan 2023 21:37:00 -0600 Subject: [PATCH] Remove marky, mark-loader --- app/soapbox/main.tsx | 4 ---- app/soapbox/performance.ts | 31 ------------------------------- package.json | 2 -- webpack/rules/mark.ts | 14 -------------- yarn.lock | 10 ---------- 5 files changed, 61 deletions(-) delete mode 100644 app/soapbox/performance.ts delete mode 100644 webpack/rules/mark.ts diff --git a/app/soapbox/main.tsx b/app/soapbox/main.tsx index 9fcfd4595..dd38193ed 100644 --- a/app/soapbox/main.tsx +++ b/app/soapbox/main.tsx @@ -25,7 +25,6 @@ import '../styles/application.scss'; import './precheck'; import { default as Soapbox } from './containers/soapbox'; import * as monitoring from './monitoring'; -import * as perf from './performance'; import ready from './ready'; import toast from './toast'; @@ -34,8 +33,6 @@ const messages = defineMessages({ updateText: { id: 'sw.update_text', defaultMessage: 'An update is available.' }, }); -perf.start('main()'); - // Sentry monitoring.start(); @@ -69,5 +66,4 @@ ready(() => { }, }); } - perf.stop('main()'); }); \ No newline at end of file diff --git a/app/soapbox/performance.ts b/app/soapbox/performance.ts deleted file mode 100644 index 36f9948a6..000000000 --- a/app/soapbox/performance.ts +++ /dev/null @@ -1,31 +0,0 @@ -'use strict'; - -import * as BuildConfig from 'soapbox/build-config'; - -// -// Tools for performance debugging, only enabled in development mode. -// Open up Chrome Dev Tools, then Timeline, then User Timing to see output. -// Also see config/webpack/loaders/mark.js for the webpack loader marks. -// - -let marky: any; - -if (BuildConfig.NODE_ENV === 'development') { - if (typeof performance !== 'undefined' && performance.setResourceTimingBufferSize) { - // Increase Firefox's performance entry limit; otherwise it's capped to 150. - // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1331135 - performance.setResourceTimingBufferSize(Infinity); - } - marky = require('marky'); - // allows us to easily do e.g. ReactPerf.printWasted() while debugging - //window.ReactPerf = require('react-addons-perf'); - //window.ReactPerf.start(); -} - -export function start(name: string): void { - marky?.mark(name); -} - -export function stop(name: string): void { - marky?.stop(name); -} diff --git a/package.json b/package.json index 6e34fa696..fcd48cd1e 100644 --- a/package.json +++ b/package.json @@ -135,8 +135,6 @@ "line-awesome": "^1.3.0", "localforage": "^1.10.0", "lodash": "^4.7.11", - "mark-loader": "^0.1.6", - "marky": "^1.2.4", "mini-css-extract-plugin": "^2.6.0", "path-browserify": "^1.0.1", "postcss": "^8.4.14", diff --git a/webpack/rules/mark.ts b/webpack/rules/mark.ts deleted file mode 100644 index 322dabc1b..000000000 --- a/webpack/rules/mark.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { env } from 'process'; - -import type { RuleSetRule } from 'webpack'; - -let rule: RuleSetRule = {}; - -if (env.NODE_ENV !== 'production') { - rule = { - test: /\.js$/, - loader: 'mark-loader', - }; -} - -export default rule; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 53bb0c5d4..0661cfbf8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8014,16 +8014,6 @@ map-obj@^4.0.0: resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7" integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ== -mark-loader@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/mark-loader/-/mark-loader-0.1.6.tgz#0abb477dca7421d70e20128ff6489f5cae8676d5" - integrity sha1-CrtHfcp0IdcOIBKP9kifXK6GdtU= - -marky@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/marky/-/marky-1.2.4.tgz#d02bb4c08be2366687c778ecd2a328971ce23d7f" - integrity sha512-zd2/GiSn6U3/jeFVZ0J9CA1LzQ8RfIVvXkb/U0swFHF/zT+dVohTAWjmo2DcIuofmIIIROlwTbd+shSeXmxr0w== - material-colors@^1.2.1: version "1.2.6" resolved "https://registry.yarnpkg.com/material-colors/-/material-colors-1.2.6.tgz#6d1958871126992ceecc72f4bcc4d8f010865f46"