ai-debug-local-mcp
Version:
🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh
32 lines • 876 B
JavaScript
/**
* Lazy Service Loader - Reduces memory by loading services on-demand
*/
export class LazyServiceLoader {
static instances = new Map();
/**
* Get or create a service instance lazily
*/
static getService(name, factory) {
if (!this.instances.has(name)) {
console.log(`💾 Lazy loading service: ${name}`);
this.instances.set(name, factory());
}
return this.instances.get(name);
}
/**
* Create a lazy getter for a service
*/
static createLazyGetter(name, factory) {
return () => this.getService(name, factory);
}
/**
* Get memory statistics
*/
static getStats() {
return {
loadedServices: this.instances.size,
services: Array.from(this.instances.keys())
};
}
}
//# sourceMappingURL=lazy-service-loader.js.map