improve generate preview picture performance