You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
Encountering a memory leak when call PyDocX.to_html, is not the right way to use it ?
test example:
# python3.6
# PyDocX == 0.9.10
def test_to_html():
tracemalloc.start()
snapshot1 = tracemalloc.take_snapshot()
for i in range(10):
with open("/tmp/test.docx", "rb") as f:
html = PyDocX.to_html(f)
print(html)
snapshot2 = tracemalloc.take_snapshot()
top_stats = snapshot2.compare_to(snapshot1, "lineno")
for stat in top_stats:
print(stat)
The text was updated successfully, but these errors were encountered:
Hi! Encountering a memory leak when call PyDocX.to_html, is not the right way to use it ?
test example:
# python3.6
# PyDocX == 0.9.10
def test_to_html():
tracemalloc.start()
snapshot1 = tracemalloc.take_snapshot()
for i in range(10):
with open("/tmp/test.docx", "rb") as f:
html = PyDocX.to_html(f)
print(html)
snapshot2 = tracemalloc.take_snapshot()
top_stats = snapshot2.compare_to(snapshot1, "lineno")
for stat in top_stats:
print(stat)
I'm supplying the file path to to_html and didn't see memory leaks (please take this with a grain of salt because I don't know how to properly analyze the snapshots).
Hi!
Encountering a memory leak when call PyDocX.to_html, is not the right way to use it ?
test example:
The text was updated successfully, but these errors were encountered: