refactored relation tree cache warming to save memory