Optimization of rendering using multiprocessing. Now it's using about 30% of the memory it used before and it's faster.
That's because now rays are created and traced in the same function that goes in parallel.
Also now using imap_unordered function for memory optimization (https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.map)