lokalise-performance-tuning

Featured

Optimize Lokalise API performance with caching, pagination, and bulk operations. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Lokalise integrations. Trigger with phrases like "lokalise performance", "optimize lokalise", "lokalise latency", "lokalise caching", "lokalise slow", "lokalise batch".

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

# Lokalise Performance Tuning ## Overview Optimize Lokalise API throughput for translation pipelines by implementing cursor pagination, local caching, batch key operations (500/request), request throttling under the 6 req/s rate limit, and selective language downloads. ## Prerequisites - `@lokalise/node-api` SDK v9+ (ESM) or REST API access - `LOKALISE_API_TOKEN` environment variable set - Understanding of project size (key count, language count) to calibrate batch sizes - Optional: Redis or LRU cache library for persistent caching ## Instructions ### Step 1: Use Cursor Pagination for Large Datasets Cursor pagination is significantly faster than offset pagination for projects with 5K+ keys. Offset pagination degrades as page numbers increase because the server must skip rows; cursor pagination uses a pointer. ```typescript import { LokaliseApi } from '@lokalise/node-api'; const lok = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN! }); // Generator that yields all keys using cursor pagination async function* getAllKeys(projectId: string) { let cursor: string | undefined; do { const result = await lok.keys().list({ project_id: projectId, limit: 500, // Maximum allowed per request pagination: 'cursor', cursor, }); for (const key of result.items) yield key; cursor = result.hasNextCursor() ? result.nextCursor : undefined; } while (cursor); } // Usage: 10,000 keys = 20 API calls (vs 100 with default limi...

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