optimized the speed of search ar and create chart