optimization MainView