/** * Performance Utilities * Helper functions for optimizing performance in the FlowDrop app */ import type { WorkflowNode, WorkflowEdge } from '../types/index.js'; /** * Fast shallow comparison for workflow nodes * Avoids expensive JSON.stringify operations */ export declare function areNodeArraysEqual(nodes1: WorkflowNode[], nodes2: WorkflowNode[]): boolean; /** * Fast shallow comparison for workflow edges * Avoids expensive JSON.stringify operations */ export declare function areEdgeArraysEqual(edges1: WorkflowEdge[], edges2: WorkflowEdge[]): boolean; /** * Throttle function execution to reduce frequency * Uses requestAnimationFrame for smooth UI updates */ export declare function throttle void>(func: T, wait: number): (...args: Parameters) => void; /** * Debounce function execution to reduce frequency * Waits for a pause in calls before executing */ export declare function debounce void>(func: T, wait: number): (...args: Parameters) => void; /** * RequestAnimationFrame-based throttle for smooth animations * Better for visual updates like node dragging */ export declare function rafThrottle void>(func: T): (...args: Parameters) => void;