Skip to content

Memory leak when reloading a document over and over #346

@Holbormon

Description

@Holbormon

Describe the bug
I believe the autoreload-on-change feature combined with the rendered page caching mechanism causes a memory leak over long work sessions.

To Reproduce
Open a presentation in pympress, work on it by periodically editing and reloading for a few hours, realise you have no ram left, close pympress, ram is restored.

Expected behavior
The rendering cache should probably be flushed whenever the document is reloaded, or maybe, every few (possibly configurable) reloads ?

Additional context
I've been running the default config (cache set to 200 pages) but I have 32GB of ram, so it seems out of place for a work session of a few hours to consume everything.

Environment (please complete the following information):

  • OS: btw I use arch Linux 6.17.5-arch1-1
  • Python version: 3.13.7
  • Pympress version: 1.8.6
  • Installation method: AUR python-pympress

Thanks for your work, this lightweight and powerful piece of software really fills a very crucial niche in the ecosystem of Linux PDF readers !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions