- Memory as the OS reports it (macOS: Activity Monitor’s “Memory”; Linux: PSS; Windows: private bytes),
- including child processes.
-
-
-
-
-
-
-
-
-
-
-
- Drops syntax trees and EditorConfig data and compacts the index; they are rebuilt on demand.
-
-
-
-
-
-
-
-
-
-
- “Process → main” is spent before any OpenIDEA code runs: exec, code-signature checks and dynamic loading. macOS
- scans a freshly built, unsigned debug binary for several seconds on its first launch.
-
-
- {error &&
{error}
}
-
- );
-}
diff --git a/src/features/perf/__tests__/perf.test.ts b/src/features/perf/__tests__/perf.test.ts
index c8eea98a..b0379864 100644
--- a/src/features/perf/__tests__/perf.test.ts
+++ b/src/features/perf/__tests__/perf.test.ts
@@ -1,6 +1,6 @@
import { describe, expect, it, vi } from "vitest";
import type { ProcessMemory } from "@/platform/ipc";
-import { formatBytes, formatCount, formatMs, formatSize, formatUptime, memoryRatio } from "../format";
+import { formatBytes, formatCount, formatMs, formatSize, formatUptime } from "../format";
import { indicatorLabel, indicatorTooltip, memorySections, summarizeMemory } from "../memory";
import { RollingWindow, percentile } from "../stats";
import { isEditorTypingEntry, keystrokeLatencies, supportsEntryType } from "../events";
@@ -26,9 +26,6 @@ describe("format", () => {
expect(formatSize(1.1 * GB)).toBe("1.1 GB");
expect(formatSize(12 * 1024)).toBe("12 KB");
expect(formatSize(null)).toBe("–");
- expect(memoryRatio(GB, 2 * GB)).toBe(0.5);
- expect(memoryRatio(3 * GB, 2 * GB)).toBe(1);
- expect(memoryRatio(null, 2 * GB)).toBe(0);
});
it("formats durations and counts", () => {
diff --git a/src/features/perf/format.ts b/src/features/perf/format.ts
index 5169f1ce..307ead6b 100644
--- a/src/features/perf/format.ts
+++ b/src/features/perf/format.ts
@@ -29,12 +29,6 @@ export function formatSize(bytes: number | null | undefined): string {
return `${trim(bytes / GB)} GB`;
}
-/** Share (0..1) of `total`, clamped. */
-export function memoryRatio(used: number | null | undefined, total: number | null | undefined): number {
- if (!used || !total || total <= 0) return 0;
- return Math.min(1, Math.max(0, used / total));
-}
-
/** `0.4 ms`, `16 ms`, `2.3 s`. */
export function formatMs(ms: number | null | undefined): string {
if (ms == null || !Number.isFinite(ms)) return "–";
diff --git a/src/features/perf/index.ts b/src/features/perf/index.ts
index 96cd6d62..90f89208 100644
--- a/src/features/perf/index.ts
+++ b/src/features/perf/index.ts
@@ -1,30 +1,16 @@
/** Memory indicator, "Clear caches" and the dev performance overlay. */
-import { lazyComponent } from "@/ui";
import { registerActions } from "@/platform/actions";
-import { registerOverlay, registerSettingsPage, registerStatusItem } from "@/workbench/contributions";
+import { registerOverlay, registerStatusItem } from "@/workbench/contributions";
import { perfActions } from "./actions";
import { MEMORY_WIDGET, MemoryStatus } from "./MemoryStatus";
import { PerfOverlay } from "./PerfOverlay";
-/** Settings › Memory Usage (also used by the Settings window). */
-export function activateSettingsPages(): () => void {
- // Top level after Plugins, as in IDEA.
- return registerSettingsPage({
- id: "memory",
- title: "Memory Usage",
- order: 950,
- keywords: ["memory", "ram", "clear caches", "index"],
- component: lazyComponent(() => import("./MemoryUsagePage").then((m) => m.MemoryUsagePage)),
- });
-}
-
export function activate(): () => void {
const disposers = [
registerActions(perfActions()),
// Far right and hidden by default, like IDEA's memory indicator.
registerStatusItem({ ...MEMORY_WIDGET, align: "right", priority: 100, component: MemoryStatus }),
registerOverlay({ id: "perf.overlay", component: PerfOverlay }),
- activateSettingsPages(),
];
return () => disposers.reverse().forEach((d) => d());
}