How do I fit a large datastructure into memory?
For a school project I'm programming on an esp32 and I want to use a kd-tree (basically a binary search tree made for locating points in space). I can store the tree on an SD card no problem, but the problem is when searching it it's likely that it'd not fit into ram. For now I need to store around 630 points in it so it might fit in with a tight squeeze but even so I'd like to find an alternative.
Do I just implement some sorta pseudo-cache where I prefetch nodes in the tree from sd card when I search through the tree? Or is there a smarter way to do this?