From obsidian-pack
Optimize Obsidian plugin performance for smooth operation. Use when experiencing lag, memory issues, or slow startup, or when optimizing plugin code for large vaults. Trigger with phrases like "obsidian performance", "obsidian slow", "optimize obsidian plugin", "obsidian memory usage".
How this skill is triggered — by the user, by Claude, or both
Slash command
/obsidian-pack:obsidian-performance-tuningThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- [Overview](#overview)
Optimize Obsidian plugin performance for smooth operation in large vaults using lazy loading, efficient file processing, and proper event handling.
| Metric | Good | Warning | Critical |
|---|---|---|---|
| Plugin load time | < 100ms | 100-500ms | > 500ms |
| Command execution | < 50ms | 50-200ms | > 200ms |
| File operation | < 10ms | 10-50ms | > 50ms |
| Memory increase | < 10MB | 10-50MB | > 50MB |
Add timing instrumentation to identify bottlenecks. Measure plugin load, command execution, and file operations.
Defer expensive operations (index building, large data loading) until first actual use rather than loading in onload().
Use vault.cachedRead(), process files in chunks (50 at a time) with pauses for UI updates, and cache results by mtime.
LRU cache for bounded memory, WeakMap for garbage-collectible references, string interning for repeated values.
Debounce file modification handlers (500ms), throttle scroll handlers (100ms), batch rapid events into single callbacks.
Use DocumentFragment for batch DOM updates, implement virtual scrolling for long lists, use requestAnimationFrame for smooth updates.
See detailed implementation for profiler, lazy service, file processor, LRU cache, event optimizer, and render optimizer code.
| Issue | Cause | Solution |
|---|---|---|
| Plugin slow to load | Heavy initialization | Use lazy loading pattern |
| UI freezes | Blocking operations | Use async + chunking |
| Memory growth | Unbounded caching | Use LRU cache with size limit |
| Event lag | Unthrottled handlers | Debounce/throttle events |
For resource optimization, see obsidian-cost-tuning.
npx claudepluginhub aiminnovations/claude-code-plugins-plus --plugin obsidian-packGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
4plugins reuse this skill
First indexed Jul 11, 2026