obsidian-rate-limits

Featured

Handle Obsidian file system operations and throttling patterns. Use when processing many files, handling bulk operations, or preventing performance issues from excessive operations. Trigger with phrases like "obsidian rate limit", "obsidian bulk operations", "obsidian file throttling", "obsidian performance limits".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Obsidian Rate Limits ## Overview Obsidian has no traditional API rate limits, but it runs on Electron with a single-threaded UI. This skill covers debouncing, batching, throttling, and async queue patterns to keep plugins responsive and prevent UI freezes. ## Prerequisites - Understanding of JavaScript event loop and `requestAnimationFrame` - Familiarity with async/await and Promises - Working Obsidian plugin with file operations ## Instructions ### Step 1: Debounce vault.on('modify') Events `vault.on('modify')` fires on every keystroke when a user types in a note. Without debouncing, your handler runs hundreds of times per second. ```typescript import { Plugin, TFile, debounce } from 'obsidian'; export default class ThrottledPlugin extends Plugin { async onload() { // Obsidian provides a built-in debounce utility const debouncedHandler = debounce( (file: TFile) => this.handleFileModified(file), 500, // wait 500ms after last keystroke true // run on leading edge too (immediate first call) ); this.registerEvent( this.app.vault.on('modify', debouncedHandler) ); } private async handleFileModified(file: TFile) { // This runs at most once per 500ms per burst of edits const cache = this.app.metadataCache.getFileCache(file); if (cache?.frontmatter?.tracked) { await this.updateIndex(file); } } } ``` If you need per-file debouncing (common when multiple files change simultaneously): ```typescript...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category