optimize ui performance