pi perf improvemnts