Optimized local tree-walk and load-balancing