Optimize toolbox building (in memory)