@mindfiredigital/pivothead
Version:
PivotHead is a powerful and flexible library for creating interactive pivot tables in JavaScript applications. It provides a core engine for data manipulation and, in the future, will be compatible with wrappers for React, Vue, Svelte, and Angular, making
66 lines • 2.11 kB
TypeScript
import type { PerformanceThresholds } from '../types/interfaces';
export type { PerformanceThresholds };
export declare class PerformanceConfig {
private static config;
/**
* Get current performance configuration
*/
static getConfig(): PerformanceThresholds;
/**
* Update performance configuration
*/
static updateConfig(updates: Partial<PerformanceThresholds>): void;
/**
* Check if workers should be used for given size/rows
*/
static shouldUseWorkers(fileSize: number, rowCount?: number): boolean;
/**
* Check if WASM should be used for given size/rows
*/
static shouldUseWasm(fileSize: number, rowCount?: number): boolean;
/**
* Check if drag/drop should be enabled
*/
static isDragDropAllowed(rowCount: number): boolean;
/**
* Check if pagination is required
*/
static requiresPagination(rowCount: number): boolean;
/**
* Get appropriate page size for dataset
*/
static getPageSize(rowCount: number): number;
/**
* Check if sampling should be used
*/
static shouldSample(rowCount: number): boolean;
/**
* Get sample size for dataset
*/
static getSampleSize(rowCount: number): number;
/**
* Get optimal chunk size for file
*/
static getChunkSize(fileSize: number): number;
/**
* Get performance mode for dataset
* Returns the optimal processing mode based on file size
*/
static getPerformanceMode(fileSize: number, rowCount: number): 'standard' | 'workers' | 'wasm' | 'streaming-wasm';
/**
* Check if virtual scrolling should be used
* @param rowCount Number of rows in the dataset
* @returns true if virtual scrolling should be enabled
*/
static shouldUseVirtualScroll(rowCount: number): boolean;
/**
* Get virtual scroll configuration
* @returns Virtual scroll settings
*/
static getVirtualScrollConfig(): {
rowHeight: number;
bufferSize: number;
threshold: number;
};
}
//# sourceMappingURL=PerformanceConfig.d.ts.map