[cleanup] Remove unused viewport culling settings and variables

- Remove ViewportCulling and CullingMargin settings from coreSettings
- Remove isViewportCullingEnabled and cullingMargin from useFeatureFlags
- Clean up unused imports and variables in GraphCanvas.vue
- Culling is no longer configurable as per design decision
This commit is contained in:
bymyself
2025-07-06 00:32:18 -07:00
parent 4304bb3ca3
commit 30728c1922
3 changed files with 2 additions and 59 deletions

View File

@@ -179,12 +179,7 @@ const selectionToolboxEnabled = computed(() =>
)
// Feature flags
const {
shouldRenderVueNodes,
// isViewportCullingEnabled, // Unused
// cullingMargin: featureCullingMargin, // Unused
isDevModeEnabled
} = useFeatureFlags()
const { shouldRenderVueNodes, isDevModeEnabled } = useFeatureFlags()
// TransformPane enabled when Vue nodes are enabled OR debug override
const debugOverrideVueNodes = ref(true) // Default to true for development
@@ -322,8 +317,6 @@ watch(
// Transform state for viewport culling
const { syncWithCanvas } = useTransformState()
// const cullingMargin = 0.2 // 20% margin outside viewport (unused)
// Replace problematic computed property with proper reactive system
const nodesToRender = computed(() => {
// Access performanceMetrics to trigger on RAF updates

View File

@@ -33,18 +33,6 @@ export const useFeatureFlags = () => {
}
})
/**
* Enable viewport culling for performance
* When disabled, all Vue nodes render regardless of viewport
*/
const isViewportCullingEnabled = computed(() => {
try {
return settingStore.get('Comfy.VueNodes.ViewportCulling' as any) ?? true
} catch {
return true
}
})
/**
* Development mode features (debug panel, etc.)
* Automatically enabled in development builds
@@ -71,23 +59,10 @@ export const useFeatureFlags = () => {
true
)
/**
* Get culling margin setting
*/
const cullingMargin = computed(() => {
try {
return settingStore.get('Comfy.VueNodes.CullingMargin' as any) ?? 0.2
} catch {
return 0.2
}
})
return {
isVueNodesEnabled,
isVueWidgetsEnabled,
isViewportCullingEnabled,
isDevModeEnabled,
shouldRenderVueNodes,
cullingMargin
shouldRenderVueNodes
}
}

View File

@@ -887,30 +887,5 @@ export const CORE_SETTINGS: SettingParams[] = [
tooltip: 'Render widgets as Vue components within Vue nodes.',
type: 'boolean',
defaultValue: true
},
{
id: 'Comfy.VueNodes.ViewportCulling' as any,
category: ['Comfy', 'Vue Nodes', 'Performance'],
experimental: true,
name: 'Enable viewport culling',
tooltip:
'Only render Vue nodes visible in viewport for better performance.',
type: 'boolean',
defaultValue: true
},
{
id: 'Comfy.VueNodes.CullingMargin' as any,
category: ['Comfy', 'Vue Nodes', 'Performance'],
experimental: true,
name: 'Viewport culling margin',
tooltip:
'Percentage of viewport to extend culling bounds (0.2 = 20% margin).',
type: 'slider',
defaultValue: 0.2,
attrs: {
min: 0,
max: 1,
step: 0.05
}
}
]