Tree-based pipeline optimization tool