#15 Insane Memory usage [PATCH]

open
nobody
None
5
2012-09-06
2007-07-15
No

If given a large archive comical will use insane amounts of memory generating thumbnails; I have had it use over three Gigabytes of virtual memory! (ie it ran out!!) The problem is that it loads the uncompressed original image into memory but doesn't discard that image once it's created the thumbnail. It only discards the original image at the same time that it's discarding real resized images after you move the current image on one.

The attached patch simply adds this discard line.

Current memory usage appers to be around 50MB to 80MB with about 32k added per image in the archive (for thumbnails).

Discussion

  • Robert de Bath

    Robert de Bath - 2007-07-15

    Patch to discard unneeded original images.

     
    Attachments
    x
  • Robert de Bath

    Robert de Bath - 2007-07-24

    Logged In: YES
    user_id=875428
    Originator: YES

    To follow up on this I think the other 'original' images should be deleted too. They're not insane with most comics but if you have an archive with real scans (300 DPI or 600DPI) each image may take 24 or 96 Megabytes. This can easily cause swapping, and once that happens the speed goes down the toilet.

    I don't think an LRU cache would be useful for keeping the 'original' images around as even with very large images as there seems to be very little gain because the high quality rescales are so slow. However, the current images may be a reasonable candidate to help with ALT-Enter.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks