frontend optimization