glean-performance-tuning

Featured

Optimize Glean search relevance and indexing throughput with batch sizing, datasource configuration, and content quality improvements. Trigger: "glean performance", "glean search quality", "glean indexing speed".

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

# Glean Performance Tuning ## Overview Glean's enterprise search API handles search queries across multiple connectors, bulk document indexing, and connector sync throughput. Search latency compounds when querying across dozens of datasources simultaneously. Large indexing jobs (10K+ documents) require careful batching to avoid rate limits and maintain connector sync schedules. Optimizing batch sizes, caching frequent search results, and tuning connector configurations reduces search P95 latency and keeps indexing pipelines within SLA windows. ## Caching Strategy ```typescript const cache = new Map<string, { data: any; expiry: number }>(); const TTL = { search: 60_000, suggestions: 30_000, datasources: 600_000 }; async function cached(key: string, ttlKey: keyof typeof TTL, fn: () => Promise<any>) { const entry = cache.get(key); if (entry && entry.expiry > Date.now()) return entry.data; const data = await fn(); cache.set(key, { data, expiry: Date.now() + TTL[ttlKey] }); return data; } // Search results expire fast (1 min). Datasource metadata is stable (10 min). ``` ## Batch Operations ```typescript import PQueue from 'p-queue'; const BATCH_SIZE = 100; async function indexDocsBatched(glean: any, dsName: string, docs: any[]) { const batches = []; for (let i = 0; i < docs.length; i += BATCH_SIZE) batches.push(docs.slice(i, i + BATCH_SIZE)); const queue = new PQueue({ concurrency: 3, interval: 500 }); await Promise.all(batches.map(batch => queue.add(()...

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