Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
51 lines
1.4 KiB
Markdown
51 lines
1.4 KiB
Markdown
# Improve Latency Performance
|
|
|
|
Improve latency performance for the following critical path: $ARGUMENTS
|
|
|
|
## Latency Optimization Strategy:
|
|
|
|
### 1. **Latency Analysis**
|
|
- Measure current end-to-end latency
|
|
- Identify latency components (network, computation, I/O)
|
|
- Analyze latency distribution and outliers
|
|
|
|
### 2. **Optimization Areas**
|
|
|
|
#### **Network Latency**
|
|
- Connection pooling for RPC calls
|
|
- Request batching and pipelining
|
|
- Caching frequently accessed data
|
|
- Asynchronous processing patterns
|
|
|
|
#### **Computational Latency**
|
|
- Algorithmic complexity reduction
|
|
- Lookup table implementation
|
|
- Parallel processing opportunities
|
|
- Precision vs. performance trade-offs
|
|
|
|
#### **I/O Latency**
|
|
- Buffering and streaming optimizations
|
|
- Disk I/O patterns
|
|
- Database query optimization
|
|
- File system caching
|
|
|
|
### 3. **MEV Bot Specific Optimizations**
|
|
|
|
#### **Critical Path Components**
|
|
- Transaction detection and parsing (< 10 microseconds target)
|
|
- Market analysis and arbitrage calculation
|
|
- Opportunity evaluation and ranking
|
|
- Execution decision making
|
|
|
|
## Implementation Guidelines:
|
|
- Measure latency at each component
|
|
- Focus on 95th and 99th percentile improvements
|
|
- Ensure deterministic performance characteristics
|
|
- Maintain accuracy while improving speed
|
|
|
|
## Deliverables:
|
|
- Latency benchmark results (before/after)
|
|
- Latency distribution analysis
|
|
- Optimization documentation
|
|
- Monitoring and alerting for latency regressions
|
|
- Performance vs. accuracy trade-off analysis |