TDI-30937 : Fix the tuj with log4j enabled
Optimize the code to reduce the memory usage