finished some code optimization work.

Signed-off-by: TomWu <myphpframe@163.com>