Bug 12763 - Artwork resizing uses too much memory
: Artwork resizing uses too much memory
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Artwork
: unspecified
: PC Other
: P1 critical with 1 vote (vote)
: 7.5.0
Assigned To: Andy Grundman
: TinySC
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-09 14:32 UTC by Andy Grundman
Modified: 2010-04-08 17:24 UTC (History)
5 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Grundman 2009-07-09 14:32:24 UTC
Resizing a lot of images in the scanner uses too much memory and gets the process killed.  We need to either spawn a new process to do each image, or possibly use command-line resizing tools.  Should also try to make it faster (lower quality) while we're at it.
Comment 1 Blackketter Dean 2009-07-15 22:52:12 UTC
Why is it using so much memory, is there a leak?
Comment 2 Andy Grundman 2009-07-16 06:03:05 UTC
It's libgd, it's pretty bad especially when resizing a very large file.  But I have a plan, running resize operations in a separate process (fork/exec or Win32::Process or whatever).  This means all slow resize operations can also be async.
Comment 3 Blackketter Dean 2009-07-16 14:33:08 UTC
Got it.  Would small images still be done in process?  (I'd worry that  
the fork could be the expensive part of that operation...)


On Jul 16, 2009, at 6:03 AM, bugs@bugs.slimdevices.com wrote:

> https://bugs-archive.lyrion.org/show_bug.cgi?id=12763
>
>
>
>
>
> --- Comment #2 from Andy Grundman <andy@slimdevices.com>  2009-07-16  
> 06:03:05 ---
> It's libgd, it's pretty bad especially when resizing a very large  
> file.  But I
> have a plan, running resize operations in a separate process (fork/ 
> exec or
> Win32::Process or whatever).  This means all slow resize operations  
> can also be
> async.
>
> -- 
> Configure bugmail: https://bugs-archive.lyrion.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
Comment 4 Andy Grundman 2009-07-16 14:39:01 UTC
GD is so slow that it's probably best to just do it for all images.  Will have to benchmark it.
Comment 5 Richard Titmuss 2009-07-27 01:11:28 UTC
Reset priority before triage.
Comment 6 Mike Walsh 2009-11-03 03:23:45 UTC
since GD no longer appears to be getting developed, and is the cause behind at least one SBS crashing bug 4699, and since GD is so slow, perhaps imagemagick should take over if its faster?  iow's why continue to keep trying to use GD, if imagemagick is better?

also, could GD become a security issue if its no longer being patched against exploits?
Comment 7 Andy Grundman 2009-11-03 04:58:55 UTC
I do want to look at using ImageMagick as it may be faster, but we use GD for a lot of things and it would be a significant effort.  For example, GD is also used for rendering true-type fonts on the ip3k display.
Comment 8 SVN Bot 2009-11-03 07:14:35 UTC
 == Auto-comment from SVN commit #29140 to the slim repo by andy ==
 == https://svn.slimdevices.com/slim?view=revision&revision=29140 ==

Bug 12763, Add support for resizing image files and audio tags directly within ImageResizer.
Using files instead of refs saves a lot of memory.
Comment 9 SVN Bot 2009-11-03 10:19:53 UTC
 == Auto-comment from SVN commit #29144 to the slim repo by andy ==
 == https://svn.slimdevices.com/slim?view=revision&revision=29144 ==

Bug 12763, updated standalone gdresize script
Comment 10 SVN Bot 2009-11-03 11:09:05 UTC
 == Auto-comment from SVN commit #29146 to the slim repo by andy ==
 == https://svn.slimdevices.com/slim?view=revision&revision=29146 ==

Bug 12763, use gdresize script during scanner precache phase
Comment 11 Andy Grundman 2009-11-03 11:16:04 UTC
Reduce hours.
Comment 12 SVN Bot 2009-11-04 14:44:15 UTC
 == Auto-comment from SVN commit #29163 to the slim repo by andy ==
 == https://svn.slimdevices.com/slim?view=revision&revision=29163 ==

Bug 12763, rewrote artwork code to be asynchronous and ususe a queue of gdresize processes to resize artwork, saving memory and improving performance. Still a bit more work to do, and this probably needs tweaked for Windows support
Comment 13 Andy Grundman 2009-11-04 14:44:39 UTC
Reduce hours.
Comment 14 Andy Grundman 2009-11-19 10:48:25 UTC
This seems to be pretty good now, marking fixed.
Comment 15 Chris Owens 2010-04-08 17:24:16 UTC
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release.

If you are still seeing this issue, please let us know!