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".

1,868 stars

Best use case

salesloft-performance-tuning is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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".

Teams using salesloft-performance-tuning should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/salesloft-performance-tuning/SKILL.md --create-dirs "https://raw.githubusercontent.com/jeremylongshore/claude-code-plugins-plus-skills/main/plugins/saas-packs/salesloft-pack/skills/salesloft-performance-tuning/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/salesloft-performance-tuning/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How salesloft-performance-tuning Compares

Feature / Agentsalesloft-performance-tuningStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 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: ['alex@co.com'] });
```

### 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 Skills

running-performance-tests

1868
from jeremylongshore/claude-code-plugins-plus-skills

Execute load testing, stress testing, and performance benchmarking. Use when performing specialized testing. Trigger with phrases like "run load tests", "test performance", or "benchmark the system".

workhuman-performance-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Workhuman performance tuning for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman performance tuning".

workhuman-cost-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Workhuman cost tuning for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman cost tuning".

wispr-performance-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Wispr Flow performance tuning for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr performance tuning".

wispr-cost-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Wispr Flow cost tuning for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr cost tuning".

windsurf-performance-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Optimize Windsurf IDE performance: indexing speed, Cascade responsiveness, and memory usage. Use when Windsurf is slow, indexing takes too long, Cascade times out, or the IDE uses too much memory. Trigger with phrases like "windsurf slow", "windsurf performance", "optimize windsurf", "windsurf memory", "cascade slow", "indexing slow".

windsurf-cost-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Optimize Windsurf licensing costs through seat management, tier selection, and credit monitoring. Use when analyzing Windsurf billing, reducing per-seat costs, or implementing usage monitoring and budget controls. Trigger with phrases like "windsurf cost", "windsurf billing", "reduce windsurf costs", "windsurf pricing", "windsurf budget".

webflow-performance-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Optimize Webflow API performance with response caching, bulk endpoint batching, CDN-cached live item reads, pagination optimization, and connection pooling. Use when experiencing slow API responses or optimizing request throughput. Trigger with phrases like "webflow performance", "optimize webflow", "webflow latency", "webflow caching", "webflow slow", "webflow batch".

webflow-cost-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Optimize Webflow costs through plan selection, CDN read optimization, bulk endpoint usage, and API usage monitoring with budget alerts. Use when analyzing Webflow billing, reducing API costs, or implementing usage monitoring for Webflow integrations. Trigger with phrases like "webflow cost", "webflow billing", "reduce webflow costs", "webflow pricing", "webflow budget".

vercel-performance-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Optimize Vercel deployment performance with caching, bundle optimization, and cold start reduction. Use when experiencing slow page loads, optimizing Core Web Vitals, or reducing serverless function cold start times. Trigger with phrases like "vercel performance", "optimize vercel", "vercel latency", "vercel caching", "vercel slow", "vercel cold start".

vercel-cost-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Optimize Vercel costs through plan selection, function efficiency, and usage monitoring. Use when analyzing Vercel billing, reducing function execution costs, or implementing spend management and budget alerts. Trigger with phrases like "vercel cost", "vercel billing", "reduce vercel costs", "vercel pricing", "vercel expensive", "vercel budget".

veeva-performance-tuning

1868
from jeremylongshore/claude-code-plugins-plus-skills

Veeva Vault performance tuning for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva performance tuning".