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".
What this skill does
# SalesLoft Performance Tuning
## Overview
Optimize SalesLoft REST API v2 performance. Key bottlenecks: deep pagination (cost multiplier), no batch endpoints, and per-minute rate limits. Solutions: caching, incremental sync, and pagination-aware request planning.
## Latency Benchmarks
| Operation | Typical | With Caching |
|-----------|---------|-------------|
| GET /me.json | 80ms | N/A (auth) |
| GET /people.json (page 1) | 120ms | 1ms (cached) |
| POST /people.json | 200ms | N/A (write) |
| GET /activities/emails.json | 150ms | 1ms (cached) |
| Full sync (10k people) | ~20min | ~5min (incremental) |
## Instructions
### Step 1: Response Caching
```typescript
import { LRUCache } from 'lru-cache';
const cache = new LRUCache<string, any>({ max: 5000, ttl: 60_000 });
async function cachedGet<T>(endpoint: string, params?: Record<string, any>): Promise<T> {
const key = `${endpoint}:${JSON.stringify(params || {})}`;
const hit = cache.get(key);
if (hit) return hit as T;
const { data } = await api.get(endpoint, { params });
cache.set(key, data);
return data;
}
// Cache people lookups (frequent during cadence enrollment)
const person = await cachedGet('/people.json', { email_addresses: ['[email protected]'] });
```
### Step 2: Incremental Sync with updated_at
```typescript
// Only fetch records changed since last sync
async function incrementalSync(lastSyncTime: string) {
const updated: any[] = [];
let page = 1;
while (true) {
const { data } = await api.get('/people.json', {
params: {
updated_at: { gt: lastSyncTime }, // ISO 8601
per_page: 100,
page,
sort_by: 'updated_at',
sort_direction: 'ASC',
},
});
updated.push(...data.data);
if (page >= data.metadata.paging.total_pages) break;
page++;
}
return { updated, newSyncTime: new Date().toISOString() };
}
```
### Step 3: Avoid Deep Pagination Cost
```typescript
// Deep pages cost 3-30x. Instead of paginating all 25k records,
// use updated_at filter to get incremental changes
function shouldUseIncremental(totalCount: number): boolean {
// If total records > 1000, incremental sync is more efficient
// Full pagination of 250 pages = 910 cost points vs.
// incremental of last 50 changes = 1 page = 1 point
return totalCount > 1000;
}
```
### Step 4: Connection Pooling
```typescript
import { Agent } from 'https';
const agent = new Agent({
keepAlive: true,
maxSockets: 10, // Max concurrent connections
maxFreeSockets: 5, // Keep idle connections alive
timeout: 30_000,
});
const api = axios.create({
baseURL: 'https://api.salesloft.com/v2',
headers: { Authorization: `Bearer ${process.env.SALESLOFT_API_KEY}` },
httpsAgent: agent,
});
```
### Step 5: Parallel Safe Reads
```typescript
// Parallelize independent reads (each costs 1 point)
const [people, cadences, activities] = await Promise.all([
api.get('/people.json', { params: { per_page: 100 } }),
api.get('/cadences.json', { params: { per_page: 50 } }),
api.get('/activities/emails.json', { params: { per_page: 100 } }),
]);
// 3 points total, ~120ms parallel vs ~360ms sequential
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Cache stampede | TTL expiry under load | Stale-while-revalidate pattern |
| Incremental misses | Clock skew | Use `updated_at` from last response, not local clock |
| Connection timeout | Pool exhausted | Increase `maxSockets` or reduce concurrency |
| Rate limit on bulk | Too many parallel requests | Use `p-queue` with `intervalCap: 10` |
## Resources
- [SalesLoft Rate Limits](https://developers.salesloft.com/docs/platform/api-basics/rate-limits/)
- [LRU Cache](https://github.com/isaacs/node-lru-cache)
## Next Steps
For cost optimization, see `salesloft-cost-tuning`.
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.