+ ) => {
+ setRenderInfo((prev) => ({
+ phase,
+ actualDuration,
+ baseDuration,
+ startTime,
+ commitTime,
+ interactions,
+ renderCount: (prev?.renderCount ?? 0) + 1,
+ minTime: Math.min(prev?.minTime ?? actualDuration, actualDuration),
+ maxTime: Math.max(prev?.maxTime ?? actualDuration, actualDuration),
+ totalTime: (prev?.totalTime ?? 0) + actualDuration,
+ avgTime: ((prev?.totalTime ?? 0) + actualDuration) / ((prev?.renderCount ?? 0) + 1),
+ }));
+ },
+ []
+ );
+
+ if (isDevMode()) {
+ return (
+ <>
+
+ {props.children}
+
+
+ {renderInfo && (
+ <>
+
+ RC: {renderInfo.renderCount}
+
+ P: {renderInfo.phase}
+
+ AD: {renderInfo.actualDuration.toFixed(2)}ms
+
+
+ BD: {renderInfo.baseDuration.toFixed(2)}ms
+
+
+ MIN: {renderInfo.minTime.toFixed(2)}ms
+
+
+ MAX: {renderInfo.maxTime.toFixed(2)}ms
+
+
+ AVG: {renderInfo.avgTime.toFixed(2)}ms
+
+ >
+ )}
+
+ >
+ );
+ }
+
+ return <>{props.children}>;
+};
+
+DebugProfiler.displayName = "DebugProfiler";
diff --git a/frontend/src/framework/internal/components/DebugProfiler/index.ts b/frontend/src/framework/internal/components/DebugProfiler/index.ts
new file mode 100644
index 000000000..daaa2e7eb
--- /dev/null
+++ b/frontend/src/framework/internal/components/DebugProfiler/index.ts
@@ -0,0 +1 @@
+export { DebugProfiler } from "./debugProfiler";
diff --git a/frontend/src/framework/internal/components/Settings/private-components/setting.tsx b/frontend/src/framework/internal/components/Settings/private-components/setting.tsx
index 1fe3f9530..c589cb01b 100644
--- a/frontend/src/framework/internal/components/Settings/private-components/setting.tsx
+++ b/frontend/src/framework/internal/components/Settings/private-components/setting.tsx
@@ -9,6 +9,8 @@ import { Cog6ToothIcon } from "@heroicons/react/20/solid";
import { CircularProgress } from "@lib/components/CircularProgress";
import { resolveClassNames } from "@lib/utils/resolveClassNames";
+import { DebugProfiler } from "../../DebugProfiler";
+
type SettingProps = {
moduleInstance: ModuleInstance;
activeModuleId: string;
@@ -74,7 +76,7 @@ export const Setting: React.FC = (props) => {
key={props.moduleInstance.getId()}
className={resolveClassNames(
props.activeModuleId === props.moduleInstance.getId() ? "flex" : "hidden",
- "flex-col h-full w-full"
+ "flex-col h-full w-full relative"
)}
>
@@ -89,13 +91,15 @@ export const Setting: React.FC = (props) => {