Optimize library dependency