Is it possible to optimize this method of data transfer or how to do it more correctly? Tell me good guides and explanations, please