GitScrum / Docs
All Best Practices

Performance Optimization in Development | Budgets Guide

Performance optimization requires measurement first. Set budgets for Core Web Vitals, bundle size, and API latency. Track improvements with GitScrum tasks.

8 min read

Performance is a feature. GitScrum helps teams track performance work alongside feature development and maintain performance budgets.

Performance Mindset

Why Performance Matters

PERFORMANCE IMPACT:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                             β”‚
β”‚ USER EXPERIENCE:                                            β”‚
β”‚                                                             β”‚
β”‚ Load time    User perception                               β”‚
β”‚ ───────────  ──────────────────────────────────────────    β”‚
β”‚ 0-100ms      Instant                                       β”‚
β”‚ 100-300ms    Slight delay, acceptable                     β”‚
β”‚ 300-1000ms   Noticeable, still OK                         β”‚
β”‚ 1-3s         Sluggish, users notice                       β”‚
β”‚ 3-10s        Frustrating, users leave                     β”‚
β”‚ >10s         Unusable                                      β”‚
β”‚                                                             β”‚
β”‚ BUSINESS IMPACT:                                            β”‚
β”‚                                                             β”‚
β”‚ β€’ 1 second delay = 7% conversion drop                     β”‚
β”‚ β€’ 53% mobile users leave if > 3 seconds                  β”‚
β”‚ β€’ Google ranks faster sites higher                        β”‚
β”‚ β€’ Slow = perceived as unreliable                          β”‚
β”‚                                                             β”‚
β”‚ ─────────────────────────────────────────────────────────── β”‚
β”‚                                                             β”‚
β”‚ PERFORMANCE ANTI-PATTERNS:                                  β”‚
β”‚                                                             β”‚
β”‚ ❌ "We'll optimize later"                                 β”‚
β”‚ β†’ Technical debt accumulates                              β”‚
β”‚ β†’ Harder to fix when architecture is set                 β”‚
β”‚                                                             β”‚
β”‚ ❌ "Premature optimization is evil"                       β”‚
β”‚ β†’ Misunderstood quote                                     β”‚
β”‚ β†’ Don't micro-optimize, but design for performance       β”‚
β”‚                                                             β”‚
β”‚ ❌ "It's fast on my machine"                              β”‚
β”‚ β†’ Test on real devices and connections                   β”‚
β”‚ β†’ Use performance monitoring                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Performance Budgets

Setting Budgets

DEFINING PERFORMANCE BUDGETS:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                             β”‚
β”‚ FRONTEND BUDGETS:                                           β”‚
β”‚                                                             β”‚
β”‚ Metric              Budget       Current    Status         β”‚
β”‚ ─────────────────   ──────────   ────────   ──────        β”‚
β”‚ LCP (Largest Paint) < 2.5s       2.1s       βœ… OK         β”‚
β”‚ FID (Input Delay)   < 100ms      85ms       βœ… OK         β”‚
β”‚ CLS (Layout Shift)  < 0.1        0.05       βœ… OK         β”‚
β”‚ Bundle size (JS)    < 300KB      285KB      ⚠️ Near limit β”‚
β”‚ Bundle size (CSS)   < 50KB       42KB       βœ… OK         β”‚
β”‚ Total page weight   < 1MB        920KB      ⚠️ Near limit β”‚
β”‚                                                             β”‚
β”‚ API BUDGETS:                                                β”‚
β”‚                                                             β”‚
β”‚ Endpoint           Budget       p95         Status         β”‚
β”‚ ─────────────────  ──────────   ─────────   ──────        β”‚
β”‚ GET /api/users     < 200ms      180ms       βœ… OK         β”‚
β”‚ GET /api/projects  < 300ms      420ms       ❌ Over       β”‚
β”‚ POST /api/tasks    < 500ms      350ms       βœ… OK         β”‚
β”‚ Search endpoint    < 1s         1.2s        ❌ Over       β”‚
β”‚                                                             β”‚
β”‚ ─────────────────────────────────────────────────────────── β”‚
β”‚                                                             β”‚
β”‚ WHEN BUDGET EXCEEDED:                                       β”‚
β”‚                                                             β”‚
β”‚ 1. Flag in CI/CD pipeline                                 β”‚
β”‚ 2. Create performance task in GitScrum                    β”‚
β”‚ 3. Must fix before or with next release                   β”‚
β”‚ 4. Review architectural impact                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Budget Enforcement

AUTOMATED BUDGET CHECKS:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                             β”‚
β”‚ CI PIPELINE:                                                β”‚
β”‚                                                             β”‚
β”‚ Build                                                       β”‚
β”‚   ↓                                                        β”‚
β”‚ Tests                                                       β”‚
β”‚   ↓                                                        β”‚
β”‚ Performance Checks ←── GATE                                β”‚
β”‚   ↓                                                        β”‚
β”‚ Deploy                                                      β”‚
β”‚                                                             β”‚
β”‚ PERFORMANCE CHECK OUTPUTS:                                  β”‚
β”‚                                                             β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚ β”‚ πŸ“Š Performance Budget Report                            β”‚β”‚
β”‚ β”‚                                                         β”‚β”‚
β”‚ β”‚ Bundle Analysis:                                        β”‚β”‚
β”‚ β”‚ βœ… main.js: 142KB (budget: 200KB)                      β”‚β”‚
β”‚ β”‚ ⚠️ vendor.js: 185KB (budget: 150KB) +35KB OVER        β”‚β”‚
β”‚ β”‚                                                         β”‚β”‚
β”‚ β”‚ Lighthouse Scores:                                      β”‚β”‚
β”‚ β”‚ βœ… Performance: 87 (budget: 85)                        β”‚β”‚
β”‚ β”‚ βœ… Accessibility: 92 (budget: 90)                      β”‚β”‚
β”‚ β”‚                                                         β”‚β”‚
β”‚ β”‚ Status: ❌ FAILED - vendor.js over budget             β”‚β”‚
β”‚ β”‚                                                         β”‚β”‚
β”‚ β”‚ Action: Review changes or update budget justification β”‚β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β”‚                                                             β”‚
β”‚ GITSCRUM AUTO-TASK:                                         β”‚
β”‚ When budget exceeded:                                      β”‚
β”‚ β†’ Create task: "Performance: vendor.js over budget"       β”‚
β”‚ β†’ Labels: performance, blocker                            β”‚
β”‚ β†’ Priority: High                                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Performance Tasks

Creating Performance Stories

PERFORMANCE STORY STRUCTURE:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PERF-123: Improve Dashboard Load Time                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                             β”‚
β”‚ As a user                                                  β”‚
β”‚ I want the dashboard to load quickly                      β”‚
β”‚ So that I can start working without waiting               β”‚
β”‚                                                             β”‚
β”‚ ═══════════════════════════════════════════════════════════ β”‚
β”‚                                                             β”‚
β”‚ CURRENT STATE:                                              β”‚
β”‚ β€’ Dashboard load: 4.2 seconds                             β”‚
β”‚ β€’ LCP: 3.8 seconds                                        β”‚
β”‚ β€’ User complaints: 12 in last month                       β”‚
β”‚                                                             β”‚
β”‚ TARGET STATE:                                               β”‚
β”‚ β€’ Dashboard load: < 2 seconds                             β”‚
β”‚ β€’ LCP: < 2.5 seconds                                      β”‚
β”‚                                                             β”‚
β”‚ ANALYSIS:                                                   β”‚
β”‚ β€’ Large initial bundle (450KB)                            β”‚
β”‚ β€’ 8 API calls on load                                     β”‚
β”‚ β€’ Unoptimized images                                      β”‚
β”‚ β€’ No caching                                               β”‚
β”‚                                                             β”‚
β”‚ APPROACH:                                                   β”‚
β”‚ ☐ Code split dashboard components                        β”‚
β”‚ ☐ Implement lazy loading                                  β”‚
β”‚ ☐ Consolidate API calls                                   β”‚
β”‚ ☐ Add response caching                                    β”‚
β”‚ ☐ Optimize images                                         β”‚
β”‚                                                             β”‚
β”‚ ACCEPTANCE CRITERIA:                                        β”‚
β”‚ ☐ Dashboard loads in < 2 seconds on 3G                   β”‚
β”‚ ☐ LCP < 2.5 seconds                                      β”‚
β”‚ ☐ Lighthouse score > 85                                  β”‚
β”‚ ☐ No regression in functionality                         β”‚
β”‚ ☐ Tested on mobile devices                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Profiling First

MEASURE BEFORE OPTIMIZING:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                             β”‚
β”‚ RULE: DON'T GUESS - MEASURE                                β”‚
β”‚                                                             β”‚
β”‚ FRONTEND PROFILING:                                         β”‚
β”‚                                                             β”‚
β”‚ 1. Browser DevTools β†’ Performance tab                     β”‚
β”‚    β€’ Record page load                                     β”‚
β”‚    β€’ Identify long tasks                                  β”‚
β”‚    β€’ See what's blocking render                          β”‚
β”‚                                                             β”‚
β”‚ 2. Lighthouse                                              β”‚
β”‚    β€’ Automated performance audit                          β”‚
β”‚    β€’ Specific recommendations                             β”‚
β”‚    β€’ Score tracking                                       β”‚
β”‚                                                             β”‚
β”‚ 3. Bundle analyzer                                         β”‚
β”‚    β€’ What's in your bundles?                             β”‚
β”‚    β€’ What can be removed/split?                          β”‚
β”‚                                                             β”‚
β”‚ BACKEND PROFILING:                                          β”‚
β”‚                                                             β”‚
β”‚ 1. APM tools (New Relic, Datadog)                        β”‚
β”‚    β€’ Request tracing                                      β”‚
β”‚    β€’ Database query times                                 β”‚
β”‚    β€’ External call latency                               β”‚
β”‚                                                             β”‚
β”‚ 2. Database EXPLAIN                                        β”‚
β”‚    β€’ Query execution plans                               β”‚
β”‚    β€’ Missing indexes                                      β”‚
β”‚    β€’ Slow query log                                       β”‚
β”‚                                                             β”‚
β”‚ 3. Load testing                                            β”‚
β”‚    β€’ How does it behave under load?                      β”‚
β”‚    β€’ Where are the bottlenecks?                          β”‚
β”‚                                                             β”‚
β”‚ DOCUMENT FINDINGS IN GITSCRUM TASK:                        β”‚
β”‚ Before optimizing, attach profiling results               β”‚
β”‚ Shows what to fix and proves the fix worked              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Common Optimizations

Quick Wins

HIGH-IMPACT OPTIMIZATIONS:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                             β”‚
β”‚ FRONTEND:                                                   β”‚
β”‚                                                             β”‚
β”‚ IMAGES:                                                     β”‚
β”‚ β€’ Use modern formats (WebP, AVIF)                         β”‚
β”‚ β€’ Responsive images (srcset)                              β”‚
β”‚ β€’ Lazy load below-fold images                             β”‚
β”‚ β†’ Often biggest win                                       β”‚
β”‚                                                             β”‚
β”‚ JAVASCRIPT:                                                 β”‚
β”‚ β€’ Code split by route                                     β”‚
β”‚ β€’ Lazy load non-critical features                         β”‚
β”‚ β€’ Remove unused dependencies                              β”‚
β”‚ β€’ Tree shake properly                                     β”‚
β”‚                                                             β”‚
β”‚ CACHING:                                                    β”‚
β”‚ β€’ Cache static assets aggressively                        β”‚
β”‚ β€’ Use service workers                                     β”‚
β”‚ β€’ Cache API responses where appropriate                  β”‚
β”‚                                                             β”‚
β”‚ ─────────────────────────────────────────────────────────── β”‚
β”‚                                                             β”‚
β”‚ BACKEND:                                                    β”‚
β”‚                                                             β”‚
β”‚ DATABASE:                                                   β”‚
β”‚ β€’ Add missing indexes                                     β”‚
β”‚ β€’ Optimize N+1 queries                                    β”‚
β”‚ β€’ Use connection pooling                                  β”‚
β”‚ β€’ Cache expensive queries                                 β”‚
β”‚                                                             β”‚
β”‚ API:                                                        β”‚
β”‚ β€’ Enable compression (gzip/brotli)                       β”‚
β”‚ β€’ Paginate large responses                               β”‚
β”‚ β€’ Use ETags for caching                                  β”‚
β”‚ β€’ Parallelize independent calls                          β”‚
β”‚                                                             β”‚
β”‚ INFRASTRUCTURE:                                             β”‚
β”‚ β€’ CDN for static assets                                   β”‚
β”‚ β€’ Geographic distribution                                 β”‚
β”‚ β€’ Appropriate instance sizes                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tracking Progress

Performance Dashboard

PERFORMANCE MONITORING:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ PERFORMANCE DASHBOARD                                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                             β”‚
β”‚ WEB VITALS (Last 7 days)                                   β”‚
β”‚                                                             β”‚
β”‚ LCP:  [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘] 2.1s  βœ… Good            β”‚
β”‚ FID:  [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘]  85ms βœ… Good            β”‚
β”‚ CLS:  [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘] 0.05  βœ… Good            β”‚
β”‚                                                             β”‚
β”‚ TREND: β†— Improving                                         β”‚
β”‚                                                             β”‚
β”‚ ─────────────────────────────────────────────────────────── β”‚
β”‚                                                             β”‚
β”‚ API RESPONSE TIMES (p95)                                    β”‚
β”‚                                                             β”‚
β”‚ Endpoint            Baseline    Current    Change          β”‚
β”‚ ─────────────────   ─────────   ────────   ──────          β”‚
β”‚ GET /api/projects   420ms       280ms      ↓ 33%          β”‚
β”‚ POST /api/tasks     350ms       320ms      ↓ 9%           β”‚
β”‚ Search              1.2s        800ms      ↓ 33%          β”‚
β”‚                                                             β”‚
β”‚ ─────────────────────────────────────────────────────────── β”‚
β”‚                                                             β”‚
β”‚ ACTIVE PERFORMANCE TASKS:                                   β”‚
β”‚                                                             β”‚
β”‚ πŸ”΄ PERF-124: Image optimization                           β”‚
β”‚ 🟑 PERF-125: Bundle splitting                             β”‚
β”‚ 🟒 PERF-126: API caching (completed)                      β”‚
β”‚                                                             β”‚
β”‚ [View all performance tasks]                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Related Solutions