No V1 means no need for the suffix. Update flag, function name, compose command, log messages, and docs.
84 lines
2.3 KiB
Markdown
84 lines
2.3 KiB
Markdown
# PPF TODO
|
|
|
|
## Optimization
|
|
|
|
### [ ] JSON Stats Response Caching
|
|
|
|
- Cache serialized JSON response with short TTL (1-2s)
|
|
- Only regenerate when underlying stats change
|
|
- Use ETag/If-None-Match for client-side caching
|
|
- Savings: ~7-9s/hour. Low priority, only matters with frequent dashboard access.
|
|
|
|
### [ ] Object Pooling for Test States
|
|
|
|
- Pool ProxyTestState and TargetTestJob, reset and reuse
|
|
- Savings: ~11-15s/hour. **Not recommended** - high effort, medium risk, modest gain.
|
|
|
|
### [ ] SQLite Connection Reuse
|
|
|
|
- Persistent connection per thread with health checks
|
|
- Savings: ~0.3s/hour. **Not recommended** - negligible benefit.
|
|
|
|
---
|
|
|
|
## Dashboard
|
|
|
|
### [ ] Performance
|
|
|
|
- Cache expensive DB queries (top countries, protocol breakdown)
|
|
- Lazy-load historical data (only when scrolled into view)
|
|
- WebSocket option for push updates (reduce polling overhead)
|
|
- Configurable refresh interval via URL param or localStorage
|
|
|
|
### [ ] Features
|
|
|
|
- Historical graphs (24h, 7d) using stats_history table
|
|
- Per-ASN performance analysis
|
|
- Alert thresholds (success rate < X%, MITM detected)
|
|
- Mobile-responsive improvements
|
|
|
|
---
|
|
|
|
## Memory
|
|
|
|
- [ ] Lock consolidation - reduce per-proxy locks (260k LockType objects)
|
|
- [ ] Leaner state objects - reduce dict/list count per job
|
|
|
|
Memory scales linearly with queue (~4.5 KB/job). No leaks detected.
|
|
Optimize only if memory becomes a constraint.
|
|
|
|
---
|
|
|
|
## Deprecation
|
|
|
|
### [x] Remove V1 worker protocol
|
|
|
|
Completed. Removed `--worker` flag, `worker_main()`, `claim_work()`,
|
|
`submit_results()`, `/api/work`, `/api/results`, and related config
|
|
options. `--worker` now routes to the URL-driven protocol.
|
|
|
|
---
|
|
|
|
## Known Issues
|
|
|
|
### [!] Podman Container Metadata Disappears
|
|
|
|
`podman ps -a` shows empty even though process is running. Service functions
|
|
correctly despite missing metadata. Monitor via `ss -tlnp`, `ps aux`, or
|
|
`curl localhost:8081/health`. Low impact.
|
|
|
|
---
|
|
|
|
## Container Debugging Checklist
|
|
|
|
```
|
|
1. Check for orphans: ps aux | grep -E "[p]rocess_name"
|
|
2. Check port conflicts: ss -tlnp | grep PORT
|
|
3. Run foreground: podman run --rm (no -d) to see output
|
|
4. Check podman state: podman ps -a
|
|
5. Clean stale: pkill -9 -f "pattern" && podman rm -f -a
|
|
6. Verify deps: config files, data dirs, volumes exist
|
|
7. Check logs: podman logs container_name 2>&1 | tail -50
|
|
8. Health check: curl -sf http://localhost:PORT/health
|
|
```
|