/**
 * Performance Optimization System - Phase 1C
 *
 * Advanced performance optimizations to reduce validation overhead
 * to <5% impact in development mode with smart caching and batching.
 */
/**
 * Performance optimization configuration
 */
export interface PerformanceOptimizerConfig {
    enabled: boolean;
    targetOverhead: number;
    batchSize: number;
    cacheStrategy: 'aggressive' | 'moderate' | 'conservative';
    asyncValidation: boolean;
    throttleMs: number;
    skipFrames: number;
}
/**
 * Validation operation metrics
 */
export interface ValidationMetrics {
    operationCount: number;
    totalTime: number;
    averageTime: number;
    maxTime: number;
    cacheHitRate: number;
    skipRate: number;
}
/**
 * Performance optimization engine
 */
export declare class PerformanceOptimizer {
    private static instance;
    private config;
    private metrics;
    private operationQueue;
    private frameCounter;
    private lastBatchTime;
    private throttleTimers;
    private defaultConfig;
    constructor(config?: Partial<PerformanceOptimizerConfig>);
    static getInstance(config?: Partial<PerformanceOptimizerConfig>): PerformanceOptimizer;
    configure(config: Partial<PerformanceOptimizerConfig>): void;
    /**
     * Optimize a validation operation with smart batching and caching
     */
    optimizeValidation<T>(key: string, operation: () => T, _skipCache?: boolean): T;
    /**
     * Batch validation operations for better performance
     */
    batchValidations(operations: Array<() => void>): void;
    /**
     * Process queued validation operations
     */
    private processBatch;
    /**
     * Check if validation should be skipped this frame
     */
    private shouldSkipFrame;
    /**
     * Check if operation is currently throttled
     */
    private isThrottled;
    /**
     * Record performance metrics
     */
    private recordMetrics;
    /**
     * Get performance metrics for a specific operation
     */
    getMetrics(key: string): ValidationMetrics | undefined;
    /**
     * Get all performance metrics
     */
    getAllMetrics(): Map<string, ValidationMetrics>;
    /**
     * Reset all metrics
     */
    resetMetrics(): void;
    /**
     * Auto-optimize based on current performance
     */
    autoOptimize(currentOverhead: number): void;
    /**
     * Measure validation overhead
     */
    measureOverhead(validationFn: () => void, iterations?: number): number;
    /**
     * Monitor and report performance continuously
     */
    startPerformanceMonitoring(intervalMs?: number): () => void;
}
/**
 * Global performance optimizer instance
 */
export declare const performanceOptimizer: PerformanceOptimizer;
/**
 * Performance optimization utilities
 */
export declare const PerformanceOptimizationUtils: {
    configure: (config: Partial<PerformanceOptimizerConfig>) => void;
    getMetrics: (key?: string) => ValidationMetrics | Map<string, ValidationMetrics> | undefined;
    resetMetrics: () => void;
    measureOverhead: (validationFn: () => void, iterations?: number) => number;
    startMonitoring: (intervalMs?: number) => () => void;
    getStats: () => {
        enabled: boolean;
        targetOverhead: number;
        batchSize: number;
        cacheStrategy: "aggressive" | "moderate" | "conservative";
        metricsCount: number;
    };
};
//# sourceMappingURL=performance-optimizer.d.ts.map