New RD library for python is leaking memory when opening/closing streams

Hey

We are trying to use the new Refinitiv Data Library for Python, but we are experiencing memory leaks when opening/closing pricing streams.


1682936446719.png


Can you please investigate and fix?


Over 20 iterations of the above stream opening and closing, the memory increases as below:

Loop #1

Memory before open stream = 103.12109375

Memory after open stream = 103.1953125

Memory after get_snapshot = 103.1953125

Memory after close stream = 103.1953125

End loop #1

[...]

Loop #19

Memory before open stream = 103.5234375

Memory after open stream = 103.5234375

Memory after get_snapshot = 103.5234375

Memory after close stream = 103.5234375

End loop #19


I am attaching a small python file where this can be tested and debugged.testRDP.txt


Best regards

Sabina

Best Answer

  • aramyan.h
    aramyan.h admin
    Answer ✓

    Hi @Sabina Tanase ,


    I have just learned from the Dev team, that the issue is now fixed with version 1.4.0. Please see below the before and after memory graphs:

    screenshot-2023-10-13-at-093553.png

    screenshot-2023-10-13-at-093516.png

    The current fix includes the Optimisation in working with listeners of streams, optimisation library imports will be delivered in 1.5.0 and in the future releases the optimisation of internal callback mechanisms will be enhanced as well.


    Best regards,

    Haykaz

Answers