Interview practice question
Handling millions of small objects in memory
Frontend Engineering · JavaScript Core · Experienced
Your browser app must handle millions of small data points, and memory usage is too high. How would you reduce it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Objects have overhead per instance.
- Struct-of-arrays with typed arrays.
- Avoid duplicate strings (interning/IDs).
- Load/aggregate on demand.
- Measure with heap snapshots.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.