Skip to content
Back to skills

Latency Principles

ASecurity

Comprehensive guide for diagnosing, optimizing, and hiding latency in software systems. Use when: (1) Debugging slow performance, (2) Designing low-latency architectures (High Frequency Trading, Real-time), (3) Optimizing Data/Compute layers, or (4) Learning about latency theory (Little's Law, Coordinated Omission).

  • 225 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 4, 2026
code-qualitygodebuggingdatabasebackendperformance

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned September 4, 2026

npx -y skills add NeverSight/skills_feed --skill latency-principles --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Latency Principles?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Latency Principles
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/neversight-latency-principles-learn-skills-dev/badge)](https://www.skillsdirectory.com/skills/neversight-latency-principles-learn-skills-dev)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: latency-principles
description: "Comprehensive guide for diagnosing, optimizing, and hiding latency in software systems. Use when: (1) Debugging slow performance, (2) Designing low-latency architectures (High Frequency Trading, Real-time), (3) Optimizing Data/Compute layers, or (4) Learning about latency theory (Little's Law, Coordinated Omission)."
---

# Latency Principles

This skill provides a systematic framework for minimizing delay in software systems, covering the entire stack from Physics and Hardware to Application Architecture and User Experience.

## 1. Core Principles
**Start here for theory and diagnosis.**
- **[references/principles.md](references/principles.md)**: Definitions of Little's Law, Amdahl's Law, Tail Latency, and Coordinated Omission.
- **[references/diagnostic_checklist.md](references/diagnostic_checklist.md)**: A checklist for identifying bottlenecks across Hardware, OS, and Runtime.

## 2. Optimization Strategies
Choose the strategy based on the bottleneck layer:

### Data Layer (Storage & Access)
**Problem:** Database queries are slow, network round-trips are killing performance, or throughput is low.
**Solution:** **[references/data_patterns.md](references/data_patterns.md)**
- **Colocation**: Moving code to data (Edge/Kernel-bypass).
- **Partitioning**: Sharding data to increase parallelism.
- **Caching**: Storing hot data in memory (Strategies & Eviction policies).
- **Replication**: Consistency models (Strong vs Eventual) and topologies.

### Compute Layer (Processing Logic)
**Problem:** High CPU usage, lock contention, Garbage Collection pauses, or slow algorithms.
**Solution:** **[references/compute_optimization.md](references/compute_optimization.md)**
- **Eliminating Work**: Better algorithms, Zero-copy serialization, Object pooling.
- **Wait-Free Sync**: Replacing Mutexes with Atomics, Ring Buffers, and Lock-free structures.
- **Concurrency**: Thread-per-core, Coroutines, and parallel execution models.

### UX Layer (Hiding Latency)
**Problem:** The backend cannot be made faster, but the user experience feels sluggish.
**Solution:** **[references/hiding_latency.md](references/hiding_latency.md)**
- **Asynchronous Processing**: Event loops, Non-blocking I/O, Request Hedging.
- **Predictive Techniques**: Prefetching data, Optimistic UI updates, Speculative execution.

## Decision Guide: Which technique to use?

| Symptom | Probable Cause | Recommended Strategy |
|---------|----------------|----------------------|
| **High Avg Latency** | Sequential processing / Slow I/O | **Concurrency** (Async I/O) or **Partitioning** |
| **High Tail Latency (p99)** | Lock contention / GC / Neighbor noise | **Wait-free Sync** (Atomics) or **Request Hedging** |
| **Network Slowness** | Distance / Protocol overhead | **Colocation** (Edge) or **Binary Serialization** (Protobuf) |
| **Database Load** | Hot keys / Complex queries | **Caching** (Read-through) or **Materialized Views** |
| **Slow Writes** | ACID guarantees / Indexing | **Write-Behind Caching** or **Sharding** |
| **"It feels slow"** | UI blocking on network | **Optimistic Updates** or **Prefetching** |

Files in this skill

  • SKILL.md3.1 KB
  • description_ar.txt503 B
  • description_cn.txt265 B
  • description_de.txt373 B
  • description_en.txt318 B
  • description_es.txt347 B
  • description_fr.txt385 B
  • description_it.txt369 B
  • description_ja.txt444 B
  • description_ko.txt345 B
  • description_ru.txt686 B
  • description_tw.txt265 B
  • stats.json66 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in code-quality →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.