optimize history trafic