Summary
The cluster visualization endpoint currently loads the entire hierarchy into memory and renders a single self-contained HTML document.
Evidence
- fetches all L2 clusters, all L1 groups, and all embedded images.
- then builds the complete in-memory hierarchy and renders all image cards into one HTML response.
- serves that full payload directly.
Why this matters
As the dataset grows, memory use and response size grow with total image count, not with the portion a user is viewing.
Suggested direction
- Add pagination, lazy loading, or chunked rendering for the visualization browser
- Consider a lighter JSON-backed UI rather than a single giant HTML payload
- Preserve representative-image and hierarchy browsing behavior
Summary
The cluster visualization endpoint currently loads the entire hierarchy into memory and renders a single self-contained HTML document.
Evidence
Why this matters
As the dataset grows, memory use and response size grow with total image count, not with the portion a user is viewing.
Suggested direction