Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

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

1.2
closed-fixed
libfm (250)
5
2014-08-23
2014-08-03
Calimero
No

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

Discussion

    • 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.