tryError Documentation
Interface: PerformanceConfig
Interface
Defined in: [config.ts:221](https://github.com/oconnorjohnson/try-error/blob/e3ae0308069a4fba073f4543d527ad76373db795/src/config.ts#L221) Performance-specific configuration options
tryError API Documentation v0.0.1-alpha.1
tryError API Documentation / PerformanceConfig
Interface: PerformanceConfig
Defined in: config.ts:221
Performance-specific configuration options
Properties
contextCapture?
optional contextCapture: {
deepClone?: boolean;
maxContextSize?: number;
timeout?: number;
};
Defined in: config.ts:254
Context capture optimization settings
deepClone?
optional deepClone: boolean;
Whether to deep clone context objects
Default
true;
maxContextSize?
optional maxContextSize: number;
Maximum context size in bytes
Default
10240 (10KB)
timeout?
optional timeout: number;
Timeout for async context capture in milliseconds
Default
100;
errorCreation?
optional errorCreation: {
cacheConstructors?: boolean;
lazyStackTrace?: boolean;
objectPooling?: boolean;
poolSize?: number;
};
Defined in: config.ts:225
Error creation optimization settings
cacheConstructors?
optional cacheConstructors: boolean;
Cache error constructors for reuse
Default
false;
lazyStackTrace?
optional lazyStackTrace: boolean;
Only capture stack trace when accessed (lazy)
Default
false;
objectPooling?
optional objectPooling: boolean;
Enable experimental object pooling
Default
false;
poolSize?
optional poolSize: number;
Object pool size when pooling is enabled
Default
50;
memory?
optional memory: {
gcHints?: boolean;
maxErrorHistory?: number;
useWeakRefs?: boolean;
};
Defined in: config.ts:277
Memory management settings
gcHints?
optional gcHints: boolean;
Provide garbage collection hints
Default
false;
maxErrorHistory?
optional maxErrorHistory: number;
Maximum number of errors to keep in history
Default
100;
useWeakRefs?
optional useWeakRefs: boolean;
Use weak references for large contexts
Default
false;