flexport-performance-tuning

Featured

Optimize Flexport API performance with pagination tuning, response caching, parallel requests, and connection pooling for logistics data. Trigger: "flexport performance", "flexport slow API", "flexport caching", "optimize flexport".

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

# Flexport Performance Tuning ## Overview Optimize Flexport API integration performance. The API is rate-limited and serves logistics data that changes infrequently (shipments update hourly, products rarely). Cache aggressively for reads, batch writes, and use maximum page sizes. ## Instructions ### Step 1: Maximize Page Size ```typescript // Default per=25. Use per=100 (max) to reduce API calls by 4x async function fetchAllShipments(): Promise<Shipment[]> { const all: Shipment[] = []; let page = 1; while (true) { const res = await flexport(`/shipments?per=100&page=${page}`); all.push(...res.data.records); if (res.data.records.length < 100) break; page++; } return all; // 1000 shipments = 10 API calls instead of 40 } ``` ### Step 2: Cache Responses ```typescript import { LRUCache } from 'lru-cache'; const cache = new LRUCache<string, any>({ max: 500, ttl: 5 * 60 * 1000, // 5 min for shipment data }); // Products change rarely — cache longer const productCache = new LRUCache<string, any>({ max: 1000, ttl: 60 * 60 * 1000, // 1 hour }); async function cachedFlexport(path: string, ttlCache = cache): Promise<any> { const cached = ttlCache.get(path); if (cached) return cached; const data = await flexport(path); ttlCache.set(path, data); return data; } ``` ### Step 3: Parallel Requests with Concurrency Control ```typescript import PQueue from 'p-queue'; const queue = new PQueue({ concurrency: 5, interval: 1000, intervalCap...

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

flexport-cost-tuning

Optimize Flexport API usage costs through efficient pagination, caching, webhook-driven updates, and monitoring API call volume. Trigger: "flexport costs", "flexport API usage", "reduce flexport calls", "flexport billing".

2,266 Updated today
jeremylongshore
AI & Automation Featured

flexport-rate-limits

Handle Flexport API rate limits with exponential backoff, queue-based throttling, and response header monitoring for logistics API calls. Trigger: "flexport rate limit", "flexport 429", "flexport throttling", "flexport backoff".

2,266 Updated today
jeremylongshore
AI & Automation Featured

appfolio-performance-tuning

Optimize AppFolio API performance with caching and batch operations. Trigger: "appfolio performance".

2,266 Updated today
jeremylongshore
AI & Automation Featured

flexport-data-handling

Implement data handling for Flexport supply chain data including PII redaction, shipment data retention, GDPR compliance, and secure document management. Trigger: "flexport data handling", "flexport PII", "flexport GDPR", "flexport data retention".

2,266 Updated today
jeremylongshore
AI & Automation Featured

salesloft-performance-tuning

Optimize SalesLoft API performance with caching, pagination strategies, and connection pooling. Use when experiencing slow API responses, reducing latency for bulk operations, or optimizing cadence sync throughput. Trigger: "salesloft performance", "optimize salesloft", "salesloft slow", "salesloft caching".

2,266 Updated today
jeremylongshore