-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I've noticed a fast increase in used memory when using PdfLoader
To reproduce this issue the minimal code below can be used.
On both Windows and Ubuntu i noticed similar results.
I've tried the Garbage Collector to free up elements, but without result.
Can you please assist on how to free the memory after loading PdfLoader ?
minimal code to reproduce:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from xpydf.pdf_loader import PdfLoader
while True:
loader = PdfLoader( 'Test.pdf' )
Below the results on Windows
Screenshot 1 with just python loaded, Screenshot 2 when test starts, Screenshot 3 after 20 seconds

Same results on Ubuntu (but less fast since it's a light system with a slower CPU)
RSS SZ VSZ
720 1298 5192
3040 1891 7564
20.080 47.376 189.504 <- test starts
28.024 49.878 199.512
32.556 50.596 202.384
32.820 50.695 202.780
33.084 50.761 203.044
.. snip ...
240.356 102.577 410.308
240.620 102.643 410.572
240.884 102.742 410.968
241.412 102.808 411.232
241.676 102.907 411.628 <- after 3 minutes
RSS: resident set size, the non-swapped physical memory that a task has used (in kiloBytes).
SZ: size in physical pages of the core image of the process. This includes text, data, and stack space.
VSZ: virtual memory size of the process in KiB (1024-byte units).