Improve segment drawing speed
optimize clear function