improve spm command performance for 2.x