palantir-performance-tuning

Featured

Optimize Palantir Foundry API performance with caching, batching, and pagination. Use when experiencing slow API responses, optimizing transform builds, or improving request throughput for Foundry integrations. Trigger with phrases like "palantir performance", "optimize foundry", "foundry slow", "palantir caching", "foundry 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

# Palantir Performance Tuning ## Overview Optimize Foundry API performance: efficient pagination, client-side caching, batch object retrieval, and Spark transform tuning with `@configure` profiles. ## Prerequisites - Completed `palantir-install-auth` setup - Working Foundry integration to optimize - Access to Foundry build metrics (for transform tuning) ## Instructions ### Step 1: Efficient Pagination ```python from functools import lru_cache def fetch_all_objects(client, ontology: str, object_type: str, page_size: int = 500): """Fetch all objects with maximum page size to minimize API calls.""" all_objects = [] page_token = None while True: result = client.ontologies.OntologyObject.list( ontology=ontology, object_type=object_type, page_size=min(page_size, 500), # Foundry max is 500 page_token=page_token, ) all_objects.extend(result.data) page_token = result.next_page_token if not page_token: break return all_objects ``` ### Step 2: Client-Side Caching ```python from cachetools import TTLCache import hashlib, json _cache = TTLCache(maxsize=1000, ttl=300) # 5-minute TTL def cached_get_object(client, ontology, object_type, primary_key): """Cache Ontology object reads to reduce API calls.""" cache_key = f"{ontology}:{object_type}:{primary_key}" if cache_key in _cache: return _cache[cache_key] obj = client.ontologies.OntologyObj...

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