optimize fade in/out time

Optimize fade in and fade out time, for better animation and efficiency
use.