alchemy-performance-tuning

Featured

Optimize Alchemy SDK performance with caching, batching, and multi-chain parallelism. Use when reducing latency for blockchain queries, optimizing CU consumption, or scaling dApps for high request volumes. Trigger: "alchemy performance", "alchemy slow", "alchemy optimization", "alchemy caching", "alchemy batch requests".

AI & Automation 2,266 stars 315 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

# Alchemy Performance Tuning ## Performance Targets | Operation | Target Latency | CU Cost | |-----------|---------------|---------| | `getBlockNumber` | < 50ms | 10 | | `getBalance` | < 100ms | 19 | | `getTokenBalances` | < 200ms | 50 | | `getNftsForOwner` | < 300ms | 50 | | `getAssetTransfers` | < 500ms | 150 | | Multi-chain portfolio | < 2s | ~400 | ## Instructions ### Step 1: Response Caching with TTL ```typescript // src/performance/cache.ts import { Alchemy, Network } from 'alchemy-sdk'; class BlockchainCache { private store = new Map<string, { data: any; expiry: number }>(); // Different TTLs for different data freshness needs private TTL: Record<string, number> = { blockNumber: 12000, // 12s (~1 block) balance: 30000, // 30s tokenBalances: 60000, // 60s nftOwnership: 300000, // 5 min (NFTs transfer less frequently) contractMetadata: 3600000, // 1 hour (rarely changes) tokenMetadata: 86400000, // 24 hours (almost never changes) }; async cached<T>(category: string, key: string, fetcher: () => Promise<T>): Promise<T> { const cacheKey = `${category}:${key}`; const entry = this.store.get(cacheKey); if (entry && entry.expiry > Date.now()) return entry.data; const data = await fetcher(); this.store.set(cacheKey, { data, expiry: Date.now() + (this.TTL[category] || 30000) }); return data; } invalidate(category: string): void { for (const key of this.store.keys()) { if (key.start...

Details

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

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

alchemy-sdk-patterns

Apply production-ready Alchemy SDK patterns for Web3 applications. Use when building reusable blockchain clients, implementing caching, multi-chain abstractions, or type-safe contract interactions. Trigger: "alchemy SDK patterns", "alchemy best practices", "alchemy code patterns".

2,266 Updated today
jeremylongshore
AI & Automation Featured

alchemy-cost-tuning

Optimize Alchemy API costs through CU budgeting, caching, and plan selection. Use when analyzing Alchemy billing, reducing Compute Unit consumption, or choosing the right plan for your dApp traffic. Trigger: "alchemy cost", "alchemy pricing", "alchemy CU budget", "alchemy billing optimization", "alchemy free tier limits".

2,266 Updated today
jeremylongshore
AI & Automation Featured

apollo-performance-tuning

Optimize Apollo.io API performance. Use when improving API response times, reducing latency, or optimizing bulk operations. Trigger with phrases like "apollo performance", "optimize apollo", "apollo slow", "apollo latency", "speed up apollo".

2,266 Updated today
jeremylongshore
AI & Automation Featured

alchemy-rate-limits

Implement Alchemy Compute Unit (CU) rate limiting and request throttling. Use when handling 429 errors, optimizing CU usage, or managing concurrent blockchain queries within plan limits. Trigger: "alchemy rate limit", "alchemy 429", "alchemy compute units", "alchemy throttling", "alchemy CU budget".

2,266 Updated today
jeremylongshore
AI & Automation Featured

attio-performance-tuning

Optimize Attio API performance -- caching, batch queries, pagination strategies, connection pooling, and latency reduction. Trigger: "attio performance", "optimize attio", "attio slow", "attio latency", "attio caching", "attio batch requests".

2,266 Updated today
jeremylongshore