#895 Even a 1MB image can use gigabytes of RAM when thumbnailing

libfm (280)

I'm having an issue with thumbnailing: pcmanfm uses 100% CPU and fills the RAM very fast. This would presumably stop at some point but I don't have enough RAM, "only" 2GB.

The issue happens when thumbnailing the attached image, which has the following characteristics:
1.1MB, PNG image data, 24832 x 10496, 8-bit/color RGB, non-interlaced

Less than 1.5MB, but opening it with a "naive" viewer uses more than 2GB of RAM.
I set the maximum file size for thumbnailing to 1.5MB in pcmanfm, which is how it happened.

Maybe it would be possible to cancel thumbnailing when the free memory reaches 80% of the amount of available RAM? As for measuring "free" (unreclaimable) memory, this can help: http://calimeroteknik.free.fr/blag/?article20/really-used-memory-on-gnu-linux

1 Attachments


    • labels: --> libfm
    • status: open --> closed-fixed
  • The limitation on thumbnails loading is now applied not only to KB of file size but to Kpix of image size as well, exactly as we discussed it in IRC. Thank you very much.