Davemaina1 squeezes legal search into 320MB of RAM
A scrappy re-architecture that runs an 86,000-chunk Kenyan law search engine on a free-tier server - and points at a pattern worth stealing.
Most legal search tools assume you can throw a managed vector database at the problem. Davemaina1 went the other way. The fork splits search into a small Python helper service, then methodically strips it down to fit inside 512MB of memory - the ceiling on Render's free hosting tier.
The heart of the trick: the entire corpus of legal chunks is pre-compressed and parked on cheap object storage. On startup the service pulls down about 50MB, memory-maps it so the data doesn't actually sit in RAM, and answers each query by doing the math directly against the file. No vector database, no reranker, no extra moving parts. Peak memory measured at 320MB, queries around 180 milliseconds.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?