fix some profermance issue

fix some profermance issue