replit-performance-tuning

Featured

Optimize Replit app performance: cold start, memory, Nix caching, and deployment speed. Use when experiencing slow startup, high memory usage, deployment timeouts, or optimizing Replit container resource usage. Trigger with phrases like "replit performance", "optimize replit", "replit slow", "replit cold start", "replit memory", "replit startup time".

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

# Replit Performance Tuning ## Overview Optimize Replit app performance across the entire lifecycle: cold start reduction, Nix environment caching, build speed, runtime memory management, and deployment configuration. Replit containers have resource limits — efficient usage is critical. ## Prerequisites - Replit app deployed or running in Workspace - Understanding of `.replit` and `replit.nix` - Access to deployment monitoring ## Instructions ### Step 1: Reduce Cold Start Time Autoscale deployments scale to zero when idle. First request triggers a cold start (10-30s). Minimize it: ```typescript // 1. Lazy-load heavy modules — only import when needed // BAD: imports everything at startup import { heavyAnalytics } from './analytics'; // 500ms import { imageProcessor } from './images'; // 300ms // GOOD: import on demand app.get('/api/analyze', async (req, res) => { const { heavyAnalytics } = await import('./analytics'); res.json(await heavyAnalytics.process(req.query)); }); // 2. Defer non-critical initialization let dbPool: Pool | null = null; function getDB(): Pool { if (!dbPool) { dbPool = new Pool({ connectionString: process.env.DATABASE_URL, ssl: { rejectUnauthorized: false }, max: 5, // Keep pool small for faster init }); } return dbPool; } // 3. Start server immediately, initialize after const app = express(); const PORT = parseInt(process.env.PORT || '3000'); app.listen(PORT, '0.0.0.0', () => { console.log(`Server ready...

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

replit-reliability-patterns

Implement reliability patterns for Replit: cold start handling, graceful shutdown, persistent state, and keep-alive. Use when building fault-tolerant Replit apps, handling container restarts, or adding resilience to production Replit deployments. Trigger with phrases like "replit reliability", "replit container restart", "replit data persistence", "replit always on", "replit graceful shutdown".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-load-scale

Load test and scale Replit deployments with Autoscale tuning, Reserved VM sizing, and capacity planning. Use when load testing Replit apps, optimizing Autoscale behavior, or planning capacity for production traffic. Trigger with phrases like "replit load test", "replit scale", "replit capacity", "replit performance test", "replit autoscale tuning".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-common-errors

Diagnose and fix the top Replit errors: container sleep, port binding, Nix failures, DB limits. Use when encountering Replit errors, debugging failed deployments, or troubleshooting workspace and hosting issues. Trigger with phrases like "replit error", "fix replit", "replit not working", "debug replit", "replit broken", "replit deploy failed".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-cost-tuning

Optimize Replit costs: deployment sizing, seat audit, egress control, and plan selection. Use when analyzing Replit billing, reducing deployment costs, or implementing usage monitoring and budget controls. Trigger with phrases like "replit cost", "replit billing", "reduce replit costs", "replit pricing", "replit expensive", "replit budget".

2,266 Updated today
jeremylongshore
AI & Automation Featured

replit-advanced-troubleshooting

Debug hard Replit issues: container lifecycle, Nix build failures, deployment crashes, and memory leaks. Use when standard troubleshooting fails, investigating intermittent failures, or diagnosing complex Replit platform behavior. Trigger with phrases like "replit hard bug", "replit mystery error", "replit impossible to debug", "replit intermittent", "replit deep debug".

2,266 Updated today
jeremylongshore