/api/meta built the city/brand/dimension/manager/status option lists with five sequential `await ch_query(...)` calls, so its latency was the sum of five round-trips to ClickHouse. The queries are independent, and the frontend hits /api/meta on every filter change, so this was 5x latency for no reason. Wrap them in asyncio.gather so they fire in parallel; total time is now ~the slowest single query plus overhead. Output verified identical. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| frontend | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| main.py | ||
| requirements.txt | ||