Certainly not the best result compared to mempalace but I was thinking something similar trough my project https://github.com/softcane/contextgc